mirror of
https://github.com/whit3rabbit/anyllm-proxy.git
synced 2026-09-22 08:00:51 +00:00
Rust workspace with two crates: - translator: pure, IO-free mapping between Anthropic Messages API and OpenAI Chat Completions - proxy: axum HTTP server with auth, streaming SSE, retry/backoff, concurrency limits 169 tests passing (unit, golden fixture, integration). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
800 B
JSON
33 lines
800 B
JSON
{
|
|
"request": {
|
|
"model": "gpt-5.4",
|
|
"messages": [
|
|
{ "role": "developer", "content": "You are a concise assistant." },
|
|
{ "role": "user", "content": "Explain what an LLM proxy does." }
|
|
],
|
|
"max_tokens": 256,
|
|
"temperature": null,
|
|
"stream": null
|
|
},
|
|
"response": {
|
|
"id": "chatcmpl-abc123",
|
|
"object": "chat.completion",
|
|
"model": "gpt-5.4",
|
|
"choices": [
|
|
{
|
|
"index": 0,
|
|
"message": {
|
|
"role": "assistant",
|
|
"content": "An LLM proxy sits between a client and a language model API, translating requests and responses between different API formats."
|
|
},
|
|
"finish_reason": "stop"
|
|
}
|
|
],
|
|
"usage": {
|
|
"prompt_tokens": 25,
|
|
"completion_tokens": 30,
|
|
"total_tokens": 55
|
|
}
|
|
}
|
|
}
|