Skip to content

Claude/add claude integration oz5i q#23

Merged
v3g42 merged 3 commits intomainfrom
claude/add-claude-integration-Oz5iQ
Mar 12, 2026
Merged

Claude/add claude integration oz5i q#23
v3g42 merged 3 commits intomainfrom
claude/add-claude-integration-Oz5iQ

Conversation

@v3g42
Copy link
Copy Markdown
Contributor

@v3g42 v3g42 commented Mar 12, 2026

No description provided.

claude and others added 3 commits March 10, 2026 17:17
…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
@v3g42 v3g42 merged commit 825687c into main Mar 12, 2026
@v3g42 v3g42 deleted the claude/add-claude-integration-Oz5iQ branch March 12, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants