Skip to content

fix(anthropic): continue after emulated web search - #259

Open
SimianW wants to merge 1 commit into
jwadow:mainfrom
SimianW:fix/native-websearch-continuation
Open

fix(anthropic): continue after emulated web search#259
SimianW wants to merge 1 commit into
jwadow:mainfrom
SimianW:fix/native-websearch-continuation

Conversation

@SimianW

@SimianW SimianW commented Jul 20, 2026

Copy link
Copy Markdown

Summary

  • continue Kiro generation after an intercepted Anthropic Path B WebSearch instead of ending with a raw search dump
  • preserve Anthropic server_tool_use and web_search_tool_result blocks in the original SSE message before streaming the model's natural answer
  • retain server-search history across mixed client-tool turns so the model can continue the original task
  • bound internal search continuation to five rounds and remove web_search on the final continuation request
  • fall back to the deterministic search summary if model continuation fails
  • accept Anthropic server WebSearch blocks when clients replay conversation history

Testing

  • pytest -q (1701 passed)
  • live Anthropic SSE verification produced server_tool_use, web_search_tool_result, then natural text, with stop_reason=end_turn

Closes #258

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.

BUG: Emulated WebSearch ends before model synthesis

1 participant