Skip to content

Handle model provider timeouts and errors#4521

Open
KyleAMathews wants to merge 2 commits into
mainfrom
fix/4520-model-provider-errors
Open

Handle model provider timeouts and errors#4521
KyleAMathews wants to merge 2 commits into
mainfrom
fix/4520-model-provider-errors

Conversation

@KyleAMathews
Copy link
Copy Markdown
Contributor

Fixes #4520.

Summary

  • add default model-provider timeout/retry settings for Pi-backed agent runs
  • classify provider failures into durable MODEL_PROVIDER_* error codes
  • attach provider errors to the active run so the UI exits thinking and displays error_code + message inline
  • preserve classified provider error codes in process-wake error rows
  • add model provider error classification tests

Verification

  • pnpm --filter @electric-ax/agents-mcp build
  • pnpm --filter @electric-ax/agents-runtime typecheck
  • pnpm --filter @electric-ax/agents-runtime exec vitest run test/model-provider-error.test.ts
  • pnpm --filter @electric-ax/agents-runtime build
  • pnpm --filter @electric-ax/agents-server-ui typecheck

@KyleAMathews KyleAMathews requested a review from thruflo June 5, 2026 18:18
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Electric Agents Desktop Builds

Build artifacts for commit 9cec07d.

Platform Status Artifact
macOS Apple Silicon Passed DMG
macOS Intel Passed DMG
Windows x64 Passed Installer
Linux x64 Passed AppImage / deb

Workflow run

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

❌ Patch coverage is 73.11321% with 57 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.03%. Comparing base (cb6ae57) to head (9cec07d).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/agents-runtime/src/pi-adapter.ts 54.54% 30 Missing ⚠️
packages/agents-runtime/src/outbound-bridge.ts 7.14% 13 Missing ⚠️
...ackages/agents-runtime/src/model-provider-error.ts 93.22% 8 Missing ⚠️
.../agents-server-ui/src/components/AgentResponse.tsx 0.00% 5 Missing ⚠️
packages/agents-runtime/src/process-wake.ts 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4521      +/-   ##
==========================================
+ Coverage   54.88%   55.03%   +0.14%     
==========================================
  Files         307      308       +1     
  Lines       34522    34715     +193     
  Branches     9871     9919      +48     
==========================================
+ Hits        18949    19104     +155     
- Misses      15554    15592      +38     
  Partials       19       19              
Flag Coverage Δ
packages/agents 71.89% <ø> (ø)
packages/agents-mobile 84.09% <ø> (ø)
packages/agents-runtime 80.90% <74.87%> (-0.07%) ⬇️
packages/agents-server 72.80% <ø> (+0.04%) ⬆️
packages/agents-server-ui 5.89% <0.00%> (+<0.01%) ⬆️
packages/electric-ax 46.42% <ø> (ø)
typescript 55.03% <73.11%> (+0.14%) ⬆️
unit-tests 55.03% <73.11%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@KyleAMathews KyleAMathews force-pushed the fix/4520-model-provider-errors branch from 67b9ae1 to a81e435 Compare June 5, 2026 18:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Electric Agents Mobile Build

Local mobile checks ran for commit 9cec07d.

The EAS Android preview build was skipped because the mobile-eas-build label is not present.
Add the mobile-eas-build label to this PR to produce an installable preview build.

Workflow run

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.

Add model provider timeouts and clearer offline/provider error feedback

1 participant