Fix Inngest agent routing#223
Conversation
Vidoc Security ReportGreat! No high-severity issues detected. Details{
"scanId": "019dc876-2f94-7087-acca-ee7e9a54cf92",
"codebaseId": "019d74e8-a953-70b7-a19d-914ab632ae39",
"installationId": "019d74e8-a4a8-772f-bdb7-b896739e2b23",
"internalPullRequestId": "019dc876-2f79-7468-824f-00949d36f395"
}
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughModel routing logic is extracted from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1215e9d5e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| name: "code-agent", | ||
| description: "An expert coding agent", | ||
| system: codeSystem, | ||
| tool_choice: "required", | ||
| model: openrouterAgentModel( |
There was a problem hiding this comment.
Require tool calls in coding agent configuration
The coding agent is now created with the default tool_choice behavior (auto), so it can legally return a plain <task_summary> without invoking createOrUpdateFiles. In this workflow, the router stops once a summary is present and the run is treated as successful, which can produce “completed” fragments with no code changes. Restoring tool_choice: "required" (or an equivalent guard) is needed to preserve the prior guarantee that code-writing tasks actually execute tool calls.
Useful? React with 👍 / 👎.
| model: openrouterAgentModel("anthropic/claude-haiku-4.5"), | ||
| }); |
There was a problem hiding this comment.
Preserve fallback for post-processing model calls
Both post-processing agents now call anthropic/claude-haiku-4.5 without any fallback chain, so a transient provider outage/rate-limit in title or response generation causes the whole job to fail after coding has already completed. Previously these steps had fallback routing; removing it regresses reliability for users in the exact failure mode this patch is trying to address.
Useful? React with 👍 / 👎.
Summary by cubic
Fixes Inngest coding agent routing to use stable tool-calling models and a deterministic retry chain, improving AgentKit reliability and failover behavior.
Centralizes model selection logic and adds better error reporting and metadata for debugging.
Bug Fixes
Refactors
src/inngest/model-routing.tswithresolveCodingModelPlanandgetToolCallingModelForAgent.tests/inngest-model-routing.test.ts.Written for commit 1215e9d. Summary will update on new commits.