Skip to content

Add web search pause_turn resubmission example#1507

Open
mindbomber wants to merge 1 commit into
anthropics:mainfrom
mindbomber:codex/pause-turn-web-search-docs
Open

Add web search pause_turn resubmission example#1507
mindbomber wants to merge 1 commit into
anthropics:mainfrom
mindbomber:codex/pause-turn-web-search-docs

Conversation

@mindbomber
Copy link
Copy Markdown

Fixes #1339

Summary

  • Add a focused web-search pause_turn example that appends the paused assistant message as a complete assistant turn.
  • Preserve returned server-tool content blocks instead of splitting, filtering, or rewriting individual server_tool_use blocks.
  • Add regression coverage showing MessageParam request transformation preserves ServerToolUseBlock models when resubmitting assistant content.

Verification

  • python -m pytest tests/test_transform.py -q -k server_tool_use -> 2 passed
  • python -m ruff check tests/test_transform.py examples/web_search_pause_turn.py -> passed
  • python -m py_compile examples/web_search_pause_turn.py -> passed
  • git diff --check -> passed
  • AANA code-change guardrail -> pass / accept, AIx 1.0, no violations

Note: python -m pytest tests/test_transform.py -q also ran, but two pre-existing Windows-only failures appeared in test_base64_file_input because the checked-out tests/sample_file.txt has CRLF line endings locally, changing the expected base64 value. The new server-tool regression test passed independently.

@mindbomber mindbomber requested a review from a team as a code owner May 6, 2026 22:14
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.

pause_turn with web_search: docs say re-submit response as-is, but API returns 400 — are we missing something?

1 participant