Anthropic web search/fetch tools result in infinite loop when using lastAssistantMessageIsCompleteWithToolCalls

### Description

1. Set up an Anthropic agent with the web fetch or web search (or probably any provider tool) enabled and set the UI with `sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithToolCalls`.
2. Send a message that triggers one of those tools
3. Response is returned to the first message
4. `lastAssistantMessageIsCompleteWithToolCalls` returns true because there is no `step-start` after the tool, so it sends the messages to the server again
5. Anthropic returns nothing (see full response below)
6. No `step-start` parts get appended due to the empty message, so `lastAssistantMessageIsCompleteWithToolCalls` returns true again, and then steps 5 and 6 repeat forever

As far as I can tell from the code and my own logs, the AI SDK has always always resent the message to the server after a web search/fetch like this, which isn't ideal but didn't fully break anything. But it appears that until recently, Anthropic actually returned an additional text message when you did that, so a `step-start` message did get appended and there was no infinite loop. I've got an example of that previous behavior below as well.

Empty Anthropic response when you re-send the completed web search messages:
```
event: message_start
data: {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01QYg6ufJg96RRnXa163bG2W","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":0,"cache_creation_input_tokens":0,"cache_read_input_tokens":25533,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard"}}            }

event: message_delta
data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":0,"cache_creation_input_tokens":0,"cache_read_input_tokens":25533,"output_tokens":3}         }

event: message_stop
data: {"type":"message_stop"      }
```

Abbreviated older messages list (from Sonnet 4.5 on Oct 5) where Anthropic used to send a text response when you re-sent its messages to it:
```
[
    {
        "id": "i2hwAfgFsY4K9zaD",
        "role": "user",
        "parts":
        [
            {
                "text": "When does the NBA season start?",
                "type": "text"
            }
        ]
    },
    {
        "id": "3Sb128FfMg4J99SF",
        "role": "assistant",
        "parts":
        [
            {
                "type": "step-start"
            },
            {
                "type": "tool-web_search",
                "input":
                {
                    "query": "NBA season start date 2024-2025"
                },
                "state": "output-available",
                "output":
                [
                    // RESULTS REMOVED FOR BREVITY
                ],
                "toolCallId": "srvtoolu_01KSMqkKSbgKhCwGZHQDaV48",
                "providerExecuted": true
            },
            {
                "text": "The current 2024-25 NBA season has already concluded, with ",
                "type": "text",
                "state": "done"
            },
            {
                "text": "the regular season ending on April 13, 2025",
                "type": "text",
                "state": "done"
            },
            {
                "text": ". The playoffs are currently underway.\n\nLooking ahead, ",
                "type": "text",
                "state": "done"
            },
            {
                "text": "the 2025-26 NBA regular season is scheduled to begin on October 21, 2025",
                "type": "text",
                "state": "done"
            },
            {
                "text": ", with opening night featuring the Rockets at Thunder and Warriors at Lakers.",
                "type": "text",
                "state": "done"
            },
            // This is where the AI SDK re-sends the messages to Anthropic and gets the below response
            {
                "type": "step-start"
            },
            {
                "text": "\n\nSince today is October 5, 2025, we're in the middle of the 2024-25 playoffs, and the next regular season will start in about two and a half weeks.",
                "type": "text",
                "state": "done"
            }
        ]
    }
]
```

### AI SDK Version

ai: 5.0.82
@ai-sdk/anthropic: 2.0.39

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Labels: bug, ai/ui
State: closed