Files
anyllm-proxy/fixtures/anthropic/claude_code_tool_result.json
whit3rabbitandClaude Opus 4.6 76e9392656 Add native Gemini backend, library mode, and middleware (Phases 20d-20g, 21a-21c)
Gemini native backend:
- Schema sanitizer strips unsupported JSON Schema keys for Gemini (20d)
- Anthropic-to-Gemini message mapping with role coercion and turn merging (20e)
- Streaming state machine for Gemini SSE and Vertex AI responses (20f)
- GeminiClient with retry/backoff, BackendClient enum dispatch (20g)
- Unified BackendError with per-backend error helpers
- Shared retry logic extracted to backend/mod.rs

Library mode (21a-21c):
- TranslationConfig with builder pattern, model mapping, lossy behavior control
- translate_request/translate_response convenience functions
- Public TranslateError enum, crate-level doc examples
- Axum middleware layer (AnthropicTranslationLayer) for embedding in existing services
- Feature-gated middleware deps (axum, reqwest, tokio)
- library_usage and middleware_integration test suites

Also: new Claude Code tool call fixtures, updated CLAUDE.md and TASKS.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 09:20:22 -05:00

121 lines
3.2 KiB
JSON

{
"request": {
"model": "claude-sonnet-4-20250514",
"max_tokens": 8096,
"messages": [
{
"role": "user",
"content": "Read the main config file and list all test files."
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "I'll read the config file and find the test files in parallel."
},
{
"type": "tool_use",
"id": "toolu_01UDAtfZkgcGYMBq7Ns84vfN",
"name": "Read",
"input": {
"file_path": "/home/user/project/config.toml"
}
},
{
"type": "tool_use",
"id": "toolu_01J3KzMqBf9tXyQFhVw2NxRG",
"name": "Glob",
"input": {
"pattern": "**/*test*"
}
}
]
},
{
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_01UDAtfZkgcGYMBq7Ns84vfN",
"content": "[package]\nname = \"my-project\"\nversion = \"0.1.0\"\nedition = \"2021\""
},
{
"type": "tool_result",
"tool_use_id": "toolu_01J3KzMqBf9tXyQFhVw2NxRG",
"content": "tests/unit_test.rs\ntests/integration_test.rs\nsrc/lib_test.rs"
}
]
}
],
"tools": [
{
"name": "Read",
"description": "Reads a file from the local filesystem.",
"input_schema": {
"type": "object",
"properties": {
"file_path": {
"type": "string",
"description": "The absolute path to the file to read"
}
},
"required": ["file_path"]
}
},
{
"name": "Glob",
"description": "Fast file pattern matching tool that works with any codebase size.",
"input_schema": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "The glob pattern to match files against"
}
},
"required": ["pattern"]
}
}
]
},
"expected_openai_messages": [
{
"role": "user",
"content": "Read the main config file and list all test files."
},
{
"role": "assistant",
"content": "I'll read the config file and find the test files in parallel.",
"tool_calls": [
{
"id": "toolu_01UDAtfZkgcGYMBq7Ns84vfN",
"type": "function",
"function": {
"name": "Read",
"arguments": "{\"file_path\":\"/home/user/project/config.toml\"}"
}
},
{
"id": "toolu_01J3KzMqBf9tXyQFhVw2NxRG",
"type": "function",
"function": {
"name": "Glob",
"arguments": "{\"pattern\":\"**/*test*\"}"
}
}
]
},
{
"role": "tool",
"tool_call_id": "toolu_01UDAtfZkgcGYMBq7Ns84vfN",
"content": "[package]\nname = \"my-project\"\nversion = \"0.1.0\"\nedition = \"2021\""
},
{
"role": "tool",
"tool_call_id": "toolu_01J3KzMqBf9tXyQFhVw2NxRG",
"content": "tests/unit_test.rs\ntests/integration_test.rs\nsrc/lib_test.rs"
}
]
}