mirror of
https://github.com/whit3rabbit/anyllm-proxy.git
synced 2026-09-21 16:00:49 +00:00
Introduce `anyllm_client` crate containing HTTP client construction, SSRF-safe DNS resolver, retry/backoff logic, rate limit header parsing, and SSE frame parsing. These were previously inlined in the proxy crate. Rename crates from `anthropic_openai_proxy`/`anthropic_openai_translate` to `anyllm_proxy`/`anyllm_translate` throughout. proxy/backend: now re-exports retry, rate limit, and SSE symbols from the client crate; `send_with_retry` and `build_http_client` are thin adapters bridging BackendAuth/TlsConfig to the client crate's types. streaming: remove duplicate `find_double_newline` and `MAX_SSE_BUFFER_SIZE` definitions; import from `crate::backend` instead. Fix missing `pub mod` declarations in translator and proxy that were accidentally replaced by doc comments (streaming, usage_map, server, redact). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
Dependency Versions
Translator Crate (anyllm_translate)
| Dependency | Version | Features | Purpose |
|---|---|---|---|
| serde | 1.x | derive | Serialization/deserialization |
| serde_json | 1.x | - | JSON handling |
| thiserror | 2.x | - | Error derive macros |
| uuid | 1.x | v4 | ID generation |
Dev Dependencies
| Dependency | Version | Purpose |
|---|---|---|
| pretty_assertions | 1.x | Readable test diffs |
Proxy Crate (anyllm_proxy)
| Dependency | Version | Features | Purpose |
|---|---|---|---|
| anyllm_translate | path | - | Translation logic |
| axum | 0.8 | - | HTTP server framework |
| tokio | 1.x | full | Async runtime |
| reqwest | 0.12 | json, stream | HTTP client |
| serde | 1.x | derive | Serialization |
| serde_json | 1.x | - | JSON handling |
| futures | 0.3 | - | Stream combinators |
| tokio-stream | 0.1 | - | Stream wrappers |
| tower | 0.5 | limit | Middleware (concurrency limits) |
| tracing | 0.1 | - | Structured logging |
| tracing-subscriber | 0.3 | env-filter, json | Log formatting |
| uuid | 1.x | v4 | Request ID generation |
Dev Dependencies
| Dependency | Version | Purpose |
|---|---|---|
| pretty_assertions | 1.x | Readable test diffs |
| reqwest | 0.12 | Integration test HTTP client |
| tokio | 1.x | Integration test runtime |
Version Policy
- All dependencies use caret ranges (e.g.,
"1"means>=1.0.0, <2.0.0). - No pinned versions; Cargo.lock (not committed) handles exact resolution.
- Minimum Rust edition: 2021.