feat(web_search): always continue on provider failure with a failed result - #859
Open
leseb wants to merge 1 commit into
Open
feat(web_search): always continue on provider failure with a failed result#859leseb wants to merge 1 commit into
leseb wants to merge 1 commit into
Conversation
…esult Remove the web-search failure-policy configuration and always continue the agentic loop with a truthful failed tool result instead of rejecting the request. - Drop `provider_failure_mode` and `status_on_error` from the web-search config; collapse `SearchOutcome` to `Results` | `Failed`. - OpenAI Responses: emit a single public `web_search_call` with `status:"failed"` and feed the model "Web search unavailable."; upsert the accumulated output item by id so the final response never contains a duplicate call for the same search. - Anthropic Messages: append a `tool_result` with `is_error:true` carrying the same bounded message and re-enter the model loop. - Share the `SEARCH_UNAVAILABLE` constant from the neutral web_search module. - Update examples, generated filter docs, and test helpers; add regression coverage including a functional agentic-loop provider-failure test. BREAKING CHANGE: `provider_failure_mode` and `status_on_error` are removed from the web-search filter configuration; provider failures now always continue the loop with a failed tool result. Signed-off-by: Sébastien Han <seb@redhat.com>
leseb
enabled auto-merge
September 1, 2026 15:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Web-search provider failures no longer surface as fake "completed" searches with no results (issue #806). The failure-policy configuration (
provider_failure_mode,status_on_error) is removed and both provider loops now always continue with a truthful failed tool result: OpenAI Responses emits a singleweb_search_callwithstatus:"failed"(upserted by id so the final response never duplicates the call) and feeds the model "Web search unavailable."; Anthropic Messages appends atool_resultwithis_error:trueand re-enters the model loop.SearchOutcomecollapses toResults | Failed, and the sharedSEARCH_UNAVAILABLEmessage now lives in one place. This is the smallest complete change that makes failures honest without adding new configuration surface.Related issue
Closes #806
Validation
cargo test -p praxis-ai-apis web_search(110 passed)cargo test -p praxis-tests-integration provider_failureand fullmake test(all 17 test binaries green)make lintChecklist
Signed-off-bytrailer.Breaking changes
The
provider_failure_modeandstatus_on_errorweb-search config fields are removed; any config that sets them must delete those keys. Behaviorally, a provider failure now always continues the agentic loop with a failed tool result instead of optionally rejecting the request.