Skip to content

feat(web_search): always continue on provider failure with a failed result - #859

Open
leseb wants to merge 1 commit into
praxis-proxy:mainfrom
leseb:leseb/validate-issue-806-prod-risk
Open

feat(web_search): always continue on provider failure with a failed result#859
leseb wants to merge 1 commit into
praxis-proxy:mainfrom
leseb:leseb/validate-issue-806-prod-risk

Conversation

@leseb

@leseb leseb commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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 single web_search_call with status:"failed" (upserted by id so the final response never duplicates the call) and feeds the model "Web search unavailable."; Anthropic Messages appends a tool_result with is_error:true and re-enters the model loop. SearchOutcome collapses to Results | Failed, and the shared SEARCH_UNAVAILABLE message 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

  • Unit tests — cargo test -p praxis-ai-apis web_search (110 passed)
  • Integration or functional tests — cargo test -p praxis-tests-integration provider_failure and full make test (all 17 test binaries green)
  • make lint

Checklist

  • I reviewed every changed line and can explain the change.
  • New capabilities include an example config and functional example test.
  • User-facing behavior and generated documentation are updated.
  • Performance-sensitive changes include appropriate benchmark or load-test evidence.
  • Commits are signed and include a Signed-off-by trailer.

Breaking changes

The provider_failure_mode and status_on_error web-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.

…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
leseb requested review from a team and alexsnaps September 1, 2026 15:37
@leseb
leseb enabled auto-merge September 1, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail-open provider errors are reported as completed searches with no results

1 participant