-
Notifications
You must be signed in to change notification settings - Fork 0
fix(runner): pydantic-ai 2.13.0 — restore WebSearch runs broken by Anthropic pause_turn #322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -446,10 +446,22 @@ async function finishTask(args: { | |
| }, | ||
| }); | ||
| if (!res.ok) { | ||
| const status = res.error.kind === "http" && (res.error.status === 401 || res.error.status === 403) | ||
| ? 502 | ||
| : 502; | ||
| return { ok: false, status, error: `Tembo Coding Agent rejected the request (${res.error.kind})` }; | ||
| // Include the upstream status + response body so a failing dispatch is | ||
| // diagnosable from the caller's error alone. Kind-only ("http") proved | ||
| // undebuggable in the field. Returning the body to the authorized caller | ||
| // matches what the chat UI already shows (formatCapError); it's LOGGING | ||
| // the body that #44 forbids — it can echo the submitted prompt. | ||
| const detail = | ||
| res.error.kind === "http" | ||
| ? `HTTP ${res.error.status}: ${res.error.body.slice(0, 300) || "(no body)"}` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One wrinkle: |
||
| : res.error.kind === "network" | ||
| ? `network: ${res.error.message}` | ||
| : res.error.kind; | ||
| return { | ||
| ok: false, | ||
| status: 502, | ||
| error: `Tembo Coding Agent rejected the request (${detail})`, | ||
| }; | ||
| } | ||
|
|
||
| if (args.ctx.workspace.commitMode === "direct") { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The v2 bump also changes streamed tool-result events from
.resultto.part(event.tool_call_idcarries the id).make_stream_handler()still readsFunctionToolResultEvent.result, so under 2.x live progress can mark successful function tool returns asok: falseuntil the final captured steps arrive. The version bump should include that handler migration so live run steps don't show false failures.