Repository navigation
fix(agent): name the status and the body of a provider error the SDK could not parse - #922
Conversation
🟢 e2e web agent: 33 passed34 agent steps · 26 replayed from cache · 21 model calls · 83.6k tokens (90% cached) · $0.0042 All 33 tests in 5 files
e2e 0.18.0 · 2m 56s · web · run artifacts |
There was a problem hiding this comment.
No issues found across 8 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Turn on auto-fix | Re-trigger cubic
🟢 e2e web: 91 passedAll 91 tests in 41 files
e2e 0.18.0 · 2m 2s · web · run artifacts |
🟢 e2e ios: 52 passed, 1 skippedAll 53 tests in 7 files
e2e 0.18.0 · 11m 49s · ios-simulator · run artifacts |
🟢 e2e android agent: 20 passed24 agent steps · 105 model calls · 545.9k tokens (85% cached) · $0.0333 All 20 tests in 1 file
e2e 0.18.0 · 8m 18s · android-emulator · run artifacts |
🟢 e2e android: 54 passed, 1 skippedAll 55 tests in 7 files
e2e 0.18.0 · 8m 20s · android-emulator · run artifacts |
🟢 e2e ios agent: 1 flaky, 20 passed, 1 skipped25 agent steps · 129 model calls · 41.3k tokens (88% cached) · $0.0023
|
| Test | Agent | Time | |
|---|---|---|---|
| tests-agent/scenarios.e2e.ts · 1 flaky, 20 passed, 1 skipped | 25 steps · 129 calls | 21m 17s | |
| 🟢 | act completes Login Form | 1 step · 7 calls | 2m 9s |
| 🟢 | act completes Infinite Scroll List | 1 step · 3 calls | 1m 22s |
| 🟢 | act completes Modal Flow | 1 step · 4 calls | 30.6s |
| 🟢 | act completes Bottom Tabs | 1 step · 3 calls | 24.8s |
| 🟢 | act completes Text Input Variations | 1 step · 4 calls | 59.5s |
| 🟢 | act completes Broken Accessibility | 2 steps · 8 calls | 1m 13s |
| 🟢 | act completes Vision Only | 2 steps · 6 calls | 57.9s |
| act completes Gestures (2 failed attempts first) | 1 step · 8 calls | 52.1s | |
| 🟢 | act completes Async States | 1 step · 8 calls | 1m 0s |
| 🟢 | act completes Debounced Search | 1 step · 5 calls | 35.4s |
| 🟢 | act completes Flattened Registration Form | 2 steps · 14 calls | 2m 29s |
| 🟢 | act completes Flattened Login | 2 steps · 9 calls | 1m 34s |
| 🟢 | act completes Sticky Chrome Target | 1 step · 8 calls | 56.8s |
| 🟢 | act completes WebView Accessibility | 1 step · 6 calls | 1m 16s |
| 🟢 | act completes Permission Prompt | 1 step · 4 calls | 33.4s |
| 🟢 | act completes Photo Picker | 1 step · 5 calls | 33.4s |
| 🟢 | act completes Product Catalog | 1 step · 5 calls | 29.0s |
| 🟢 | act completes Error Recovery | 1 step · 4 calls | 26.9s |
| 🟢 | act completes Choice Controls | 1 step · 9 calls | 1m 3s |
| 🟢 | act completes Stripe PaymentSheet | 1 step · 5 calls | 1m 12s |
| 🟢 | act completes Apple Pay | 1 step · 4 calls | 39.0s |
| ⏭️ | act completes Apple Pay Billing Address (skipped: the CI simulator's Apple Pay sheet skips the billing-address step, so the scenario cannot be completed there) |
e2e 0.18.0 · 24m 26s · ios-simulator · run artifacts
|
[claude-opus-5-5] responding on behalf of okwasniewski
|
72cceb5 to
109c5a0
Compare
109c5a0 to
3ce9fc2
Compare
🟢 e2e android: 54 passed, 1 skippedAll 55 tests in 7 files
e2e 0.18.0 · 8m 44s · android-emulator · run artifacts |
🟢 e2e android agent: 20 passed24 agent steps · 113 model calls · 600.3k tokens (84% cached) · $0.0372 All 20 tests in 1 file
e2e 0.18.0 · 9m 28s · android-emulator · run artifacts |
🟢 e2e ios: 52 passed, 1 skippedAll 53 tests in 7 files
e2e 0.18.0 · 7m 32s · ios-simulator · run artifacts |
🟢 e2e ios agent: 1 flaky, 20 passed, 1 skipped25 agent steps · 140 model calls · 69.6k tokens (86% cached) · $0.0043
|
| Test | Agent | Time | |
|---|---|---|---|
| tests-agent/scenarios.e2e.ts · 1 flaky, 20 passed, 1 skipped | 25 steps · 140 calls | 15m 9s | |
| 🟢 | act completes Login Form | 1 step · 8 calls | 1m 2s |
| 🟢 | act completes Infinite Scroll List | 1 step · 3 calls | 1m 2s |
| 🟢 | act completes Modal Flow | 1 step · 4 calls | 20.1s |
| 🟢 | act completes Bottom Tabs | 1 step · 3 calls | 14.2s |
| 🟢 | act completes Text Input Variations | 1 step · 5 calls | 33.4s |
| 🟢 | act completes Broken Accessibility | 2 steps · 7 calls | 56.6s |
| 🟢 | act completes Vision Only | 2 steps · 6 calls | 40.8s |
| act completes Gestures (2 failed attempts first) | 1 step · 12 calls | 1m 3s | |
| 🟢 | act completes Async States | 1 step · 6 calls | 34.6s |
| 🟢 | act completes Debounced Search | 1 step · 5 calls | 27.5s |
| 🟢 | act completes Flattened Registration Form | 2 steps · 16 calls | 1m 57s |
| 🟢 | act completes Flattened Login | 2 steps · 12 calls | 1m 27s |
| 🟢 | act completes Sticky Chrome Target | 1 step · 8 calls | 45.0s |
| 🟢 | act completes WebView Accessibility | 1 step · 5 calls | 27.7s |
| 🟢 | act completes Permission Prompt | 1 step · 3 calls | 17.4s |
| 🟢 | act completes Photo Picker | 1 step · 4 calls | 17.3s |
| 🟢 | act completes Product Catalog | 1 step · 5 calls | 28.4s |
| 🟢 | act completes Error Recovery | 1 step · 6 calls | 18.1s |
| 🟢 | act completes Choice Controls | 1 step · 8 calls | 47.7s |
| 🟢 | act completes Stripe PaymentSheet | 1 step · 9 calls | 1m 1s |
| 🟢 | act completes Apple Pay | 1 step · 5 calls | 27.6s |
| ⏭️ | act completes Apple Pay Billing Address (skipped: the CI simulator's Apple Pay sheet skips the billing-address step, so the scenario cannot be completed there) |
e2e 0.18.0 · 17m 45s · ios-simulator · run artifacts
Fixes ENG-875
createJsonErrorResponseHandler) usesresponse.statusTextas the message.statusTextis empty over HTTP/2. The status and body stay on theAPICallError, anddatastaysundefined. The ChatGPT backend's400 {"detail":"Unsupported service_tier: fast"}hits this path.cause.message, so the step failedMODEL_PROVIDER_FAILEDwith an empty message and the--ai-tracestep error was"".providerFailureMessage(packages/e2e/src/internal/errors.ts): for anAI_APICallErrorwith status >= 400, a string body, and no parseddata, it returnsHTTP <status>[ <statusText>]: <body>.…marker, so a secret that straddles the cut can't leak a prefix.AI_APICallError, so they are untouched too.RetryErroris described by its last attempt, the same way judgments already unwrap it. Before this, a retryable HTTP/2 502 with an HTML body still readFailed after 6 attempts. Last error:with nothing after it.agent/model/sdk.ts(judgments, including theCONTEXT_OVERFLOWmessage),agent/tool-loop.ts(act), andinternal/ai-trace.ts(onError).docs/reference/errors.mdxhas one added sentence on theMODEL_PROVIDER_FAILEDrow.Verified
Ran it locally: yes
400 {"detail":"Unsupported service_tier: fast"}and an empty status text. Command:e2e run --config <scratch config> --ai-trace, oneagent.actstep. The scratch config is not committed.ai-traceone gets'', and the act and judgment ones get an empty provider message. They pass here and cover the act and judgment paths through a real@ai-sdk/openai-compatiblemodel with a stubbedfetch, redaction of a secret straddling the cut, and a 502 retry chain.MODEL_PROVIDER_FAILED: the model provider failed:MODEL_PROVIDER_FAILED: the model provider failed: HTTP 400: {"detail":"Unsupported service_tier: fast"}.e2e/ai-trace.jsonsteperror"""HTTP 400: {\"detail\":\"Unsupported service_tier: fast\"}"Not verified: the real ChatGPT backend (no stored login locally). The fake server reproduces the reported response shape.