Skip to content

fix(agent): inspect wrapped API error bodies - #14349

Closed
sgaofen wants to merge 1 commit into
NousResearch:mainfrom
sgaofen:codex/fix-14195-wrapped-error-body
Closed

sgaofen wants to merge 1 commit into
NousResearch:mainfrom
sgaofen:codex/fix-14195-wrapped-error-body

Conversation

@sgaofen

@sgaofen sgaofen commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Root cause

Wrapped SDK exceptions could expose a nested HTTP status code while hiding the nested structured body. That made transient 402 usage-limit responses look like plain billing failures.

Tests

  • uv run --frozen --python 3.11 --extra dev pytest -o addopts='' tests/agent/test_error_classifier.py -q
  • git diff --check

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint labels Apr 23, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

Fixed via PR #53582 (#53582), which salvaged @LeonSGP43's #14287 onto current main. Your PR fixed the same issue (#14195) with an equivalent approach — thanks for the contribution and the duplicate coverage.

@teknium1 teknium1 closed this Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrapped API errors lose nested body details and misclassify transient 402s as billing failures

3 participants