litellm/litellm-rust/crates/traces/AGENTS.md
devin-ai-integration[bot] 9b6a6a0b71
refactor(tracing): generate existing HTTP request models from Rust schemas (#44591)
* test(tracing): pin HTTP request compatibility

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(tracing): generate existing HTTP request models from Rust schemas

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(tracing): bind trace query params to generated request models

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* ci(rust): raise the native wheel size gate to 48 MB

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* perf(tracing): read the trace list clock without a thread-pool dispatch

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(traces): share the trace page-size bounds between schema and reader

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(ui): type trace request queries against the generated OpenAPI schema

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs: encode the trace contract boundary in AGENTS.md

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* style(ui): format trace request aliases

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Yujong Lee <yujong@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-05 17:37:52 +00:00

1.2 KiB

  • Own OTLP decoding, normalization, shared authorization and named query contracts; remain independent of storage and Python
  • Never depend on litellm-traces-clickhouse or litellm-storage-clickhouse
  • Preserve decoding limits, normalization precedence and shared resource identity
  • Keep ClickHouse schema, row encoding and queries in litellm-traces-clickhouse; keep PyO3 conversion in python-bridge
  • Test decoding and normalization through the public API
  • Expose one top-level Error enum in src/error.rs for decoding and normalization failures
  • Own the tracing HTTP contracts: request types in src/request.rs and response views exported from src/schema.rs
  • Python and the dashboard consume them only through generated code: uv run scripts/generate_trace_types.py writes litellm/rust_bridge/trace/generated/, and npm run gen:api in ui/litellm-dashboard regenerates schema.d.ts from the proxy's OpenAPI
  • Declare each bound once as a constant and read it from both the schema attribute and the runtime check
  • GET request types accept unknown fields because the routes ignore unknown query parameters; body request types use deny_unknown_fields
  • Changing a request or response shape changes the public API; ship it in its own behavior-change PR