-
Notifications
You must be signed in to change notification settings - Fork 256
Open
Description
When using multiple Skills with streaming enabled in the Foundry API, the stream ends prematurely without returning
message_delta and message_stop events. This prevents retrieval of the container ID and causes incomplete stream
handling.
Environment
- SDK: @anthropic-ai/foundry-sdk
- Platform: Microsoft Foundry
- Model: claude-haiku-4-5
- Stream: true
- Betas: code-execution-2025-08-25, skills-2025-10-02
Steps to Reproduce
- Initialize Foundry client with 2 or more Skills in the container parameter
- Send a message request with
stream: true - Observe the stream event sequence
Expected Behavior
- Stream should include: message_start → content_block_* events → message_delta → message_stop
- Container ID should be available in
message_delta.delta.container.id - All events should complete before stream ends
Actual Behavior
- Stream ends after content_block_stop events
- message_delta event is never received
- message_stop event is never received
- Stream completes without final events, leaving stream in incomplete state
Logs
Request Configuration:
{
"model": "claude-haiku-4-5",
"stream": true,
"betas": ["code-execution-2025-08-25", "skills-2025-10-02"],
"container": {
"skills": [
{
"type": "anthropic",
"skill_id": "xlsx",
"version": "latest"
},
{
"type": "anthropic",
"skill_id": "pptx",
"version": "latest"
}
]
}
}
Stream Event Sequence (Actual):
1. ✅ message_start (no container field)
2. ✅ content_block_start: text
3. ✅ content_block_delta: text_delta (multiple events)
4. ✅ content_block_stop
5. ✅ content_block_start: server_tool_use (first skill)
6. ✅ content_block_delta: input_json_delta (multiple events)
7. ✅ content_block_stop
8. ✅ content_block_start: server_tool_use (second skill)
9. ✅ content_block_delta: input_json_delta (multiple events)
10. ✅ content_block_stop
11. ❌ Stream ends here - message_delta and message_stop never arrive
Workaround (Non-streaming mode works):
// stream: false で実行するとコンテナIDが正常に返却される
{
"stream": false,
"container": {
"id": "container_011CXbQCtRNCswtwatctJJwk",
...
}
}
Additional Notes
- Single skill with streaming: ✅ Works correctly
- Multiple skills added sequentially (1st skill, then add 2nd): ✅ Works correctly (message_delta received)
- Multiple skills on initial request: ❌ message_delta never received
- Non-streaming mode with multiple skills: ✅ Container ID returned correctly
This appears to be specific to initial requests with multiple Skills using streaming mode.
Related Issues
- #842 - Streaming responses consistently interrupted mid-transmission
- liteLLM #8066 - Tool calls not working with streaming
---Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels