fix(llm): consolidate fallback into one physical attempt budget - #902
Conversation
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — 05ccfc4f
Blanket team auto-approval is intentional. The merge gates are CI and codex-p1.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-09-29T23:41:56Z
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — 534ad8ae
Blanket team auto-approval is intentional. The merge gates are CI and codex-p1.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-09-30T00:00:56Z
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — c33ffad1
Blanket team auto-approval is intentional. The merge gates are CI and codex-p1.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-09-30T00:11:56Z
…storical evidence
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — 64aeaf86
Blanket team auto-approval is intentional. The merge gates are CI and codex-p1.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-09-30T00:12:56Z
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — ce18ea63
Blanket team auto-approval is intentional. The merge gates are CI and codex-p1.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-09-30T05:56:32Z
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — 6135051e
Blanket team auto-approval is intentional. The merge gates are CI and codex-p1.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-09-30T05:59:35Z
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved PR — 41afe73e
Blanket team auto-approval is intentional. The merge gates are CI and codex-p1.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-09-30T06:00:32Z
Outcome
One existing retry loop owns raw and structured model requests. Schema fallback no longer starts a second call with a fresh attempt allowance, deadline origin, or raw-provider attempt sequence.
maximumAttemptscounts physical HTTP requests, including transient, schema and temperature fallback. One means one request.maximumChargeForLlmRequestreserves that same allowance instead of two full batches for schema-capable calls. The original schema still bounds input; output limits remain enforced per physical request.Final verification
Head:
64aeaf8683fff99bd9c99905d20a3ba1dea22717.Original base:
a6ed111e533b1af74792a9c727e2bced7065e8b6.Full exact-head CI passed: https://github.com/tangle-network/agent-eval/actions/runs/36649148569
Inspected successful steps: dependency installation, Biome, source/scripts/examples typechecks, full tests, build/OpenAPI, packed exports, Python client/distributions, official TypeScript optimizer integration, GEPA and DSPy compatibility. Both main CI and the separate published-GEPA job passed.
Local proof: 96 focused checks passed, including seven real-loopback HTTP cases and the maintained client/retry/raw-capture/analyst suites. Five of the seven new HTTP cases fail against the exact unchanged production baseline, then pass after the fix. Native Node fetch and the public client execute; the external response is controlled by a real local HTTP server.
Follow-through from CI
.gitattributesfor LF TypeScript/Markdown checkouts after reproducing the formatter failure withcore.autocrlf=true. No formatter gate was removed or relaxed.Local execution used a restored dependency tree; the final repository CI above is separate stronger evidence. No test was skipped, no coverage threshold lowered, and no signoff was fabricated.
Reproduce
pnpm install --frozen-lockfile pnpm exec vitest run src/llm-client.test.ts tests/llm-transient-status.test.ts tests/llm-raw-capture.test.ts tests/llm-physical-attempts.test.ts src/analyst/adapters.test.ts pnpm typecheck pnpm build pnpm verify:packageBoundaries
This fixes attempt ownership, not provider-side deduplication, automatic result replay, aggregation of all failed paid-attempt receipts into the terminal response, or every single-attempt body-read deadline. Existing caller accounting still owns observations. No dependency, package version, credentials, production deployment, funded inference or merge changed.
The temporary exact-source importer was isolated on a delivery branch and removed after use; it is absent from the feature diff. It executed no candidate application code and wrote no success status.
Refs #768; complements tangle-network/agent-dev-container#8533 without a cross-repository release dependency.