Conversation
|
Automated review 🤖 Summary of Changes Key Changes & Positives
Potential Issues & Recommendations
Language/Framework Checks
Security & Privacy
Build/CI & Ops
Tests
|
There was a problem hiding this comment.
Pull request overview
This PR addresses Anthropic programmatic tool calling (PTC) behavior around code execution blocks, ensuring replay/resume flows don’t resend code_execution_tool_result blocks while also surfacing code execution diagnostics consistently in both streaming and non-streaming results.
Changes:
- Filter
code_execution_tool_resultblocks out of assistant replay content when resuming programmatic tool results. - Surface code execution diagnostics via a shared
CodeExecutionResultInfotype on bothGenerateResultand stream chunks. - Add a debug example harness for Anthropic PTC and bump package version to
1.11.1.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/core/mapping/anthropic.mapper.spec.ts | Adds coverage for filtering replay blocks and for surfacing code execution diagnostics in streaming/non-streaming mappings. |
| src/types/stream.types.ts | Reuses the shared CodeExecutionResultInfo shape for code_execution_result stream chunks. |
| src/types/result.types.ts | Adds codeExecutionResults?: CodeExecutionResultInfo[] to GenerateResult. |
| src/types/common.types.ts | Introduces CodeExecutionResultInfo as the provider-agnostic diagnostics payload. |
| src/core/mapping/anthropic.mapper.ts | Implements replay filtering logic and collects code execution diagnostics into results/chunks. |
| package.json | Bumps version and adds an example script entry. |
| examples/anthropic-ptc-debug.ts | Adds a runnable debug harness for investigating Anthropic PTC streaming behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| import { Citation, ProviderKey, CodeExecutionResultInfo } from './common.types' // Import ProviderKey | ||
| // Remove unused Provider import | ||
| // import { Provider } from './common.types' // Removed | ||
|
|
No description provided.