-
Notifications
You must be signed in to change notification settings - Fork 1
Add prompt cache key argument + other updates #262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Ankur Goyal (ankrgyl)
wants to merge
1
commit into
main
Choose a base branch
from
prompt-cache-key-updates
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
bindings/typescript/src/generated/anthropic/InputContentBlockType.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
|
||
| export type InputContentBlockType = "bash_code_execution_tool_result" | "code_execution_tool_result" | "container_upload" | "document" | "image" | "redacted_thinking" | "search_result" | "server_tool_use" | "text" | "text_editor_code_execution_tool_result" | "thinking" | "tool_result" | "tool_search_tool_result" | "tool_use" | "web_fetch_tool_result" | "web_search_tool_result"; | ||
| export type InputContentBlockType = "bash_code_execution_tool_result" | "code_execution_tool_result" | "container_upload" | "document" | "image" | "mid_conv_system" | "redacted_thinking" | "search_result" | "server_tool_use" | "text" | "text_editor_code_execution_tool_result" | "thinking" | "tool_result" | "tool_search_tool_result" | "tool_use" | "web_fetch_tool_result" | "web_search_tool_result"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
|
||
| export type MessageRole = "assistant" | "user"; | ||
| export type MessageRole = "assistant" | "system" | "user"; |
2 changes: 1 addition & 1 deletion
2
bindings/typescript/src/generated/anthropic/ToolResultErrorCode.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
|
||
| export type ToolResultErrorCode = "execution_time_exceeded" | "file_not_found" | "invalid_tool_input" | "max_uses_exceeded" | "output_file_too_large" | "query_too_long" | "request_too_large" | "too_many_requests" | "unavailable" | "unsupported_content_type" | "url_not_accessible" | "url_not_allowed" | "url_too_long"; | ||
| export type ToolResultErrorCode = "execution_time_exceeded" | "file_not_found" | "invalid_tool_input" | "max_uses_exceeded" | "output_file_too_large" | "query_too_long" | "request_too_large" | "too_many_requests" | "unavailable" | "unsupported_content_type" | "url_not_accessible" | "url_not_allowed" | "url_not_in_prior_context" | "url_too_long"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an Anthropic request includes a new
role: "system"/mid_conv_systemmessage after a user turn, this imports it as an ordinaryMessage::System. The Anthropic exporter later callsextract_system_messagesand removes allMessage::Systemvalues from their original positions into the top-levelsystemfield, so any path that re-emits from universal without the raw Anthropic extras changes a mid-conversation instruction into a leading system prompt or merges it with the initial prompt. Since this commit adds support for mid-conversation system blocks, the import needs a placement-preserving representation or the exporter needs to emit Anthropic's mid-conversation shape.Useful? React with 👍 / 👎.