Merged
Conversation
…ol search mode Adds a direct Anthropic Claude API integration as an alternative to OpenAI, with first-class prompt caching support and a new tool delivery mode. ## Claude Integration - New `Anthropic` variant in `ModelProvider` enum with base_url and api_key config - `claude_client.rs`: Direct reqwest-based Anthropic Messages API client supporting prompt caching (cache_control breakpoints), streaming (SSE), and native tool use - `claude_llm.rs`: Full LLM executor implementing the same patterns as the OpenAI executor (execute, execute_stream, message mapping, event emission) - Prompt caching strategy: system prompt, last tool definition, and conversation prefix breakpoints for optimal cache hit rates across multi-turn conversations - Factory function `create_llm_executor()` in llm.rs for provider-based dispatch ## Tool Search Mode - New `ToolDeliveryMode` enum: `AllTools` (default, send all schemas upfront) vs `ToolSearch` (send names+descriptions, agent discovers schemas on demand) - `tool_search` built-in tool lets agents query for tool schemas by name or keyword - Added `tool_delivery_mode` to `LlmDefinition` and `StandardDefinition` https://claude.ai/code/session_01JKpvKsGdQacLQdhSZqX1bK
The tool_search tool needs to be: 1. Listed in get_builtin_tools() so it can be included via tools.builtin config 2. Registered in cast_to_executor_context_tool() so it can be executed at runtime https://claude.ai/code/session_01JKpvKsGdQacLQdhSZqX1bK
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.