mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
Port the proxy's OpenAI-format Decisions endpoint to the Rust gateway at /v1/decisions and /decisions, for OpenAI and Azure OpenAI deployments. Requests are validated as the proxy validates them before hooks count them, the provider body is rebuilt from the decision fields, and answers are aligned to the questions with refusals for what the provider left out. Box questions follow model_info.supports_box_questions and drop_params. Decisions run through the hooks pipeline like chat and messages: virtual keys and allowed routes, rate limits, budgets, spend logs, prometheus and the S3 log. Cost uses the cost map's _decisions price overrides on the decisions route. The loadtest kit gains decisions support in mockllm, loadgen and genconfig, and a system-one-auto workload of 2,000 input and 20 output tokens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FDwtmKWH21oDCJn1MFbd3 |
||
|---|---|---|
| .. | ||
| body.go | ||
| body_test.go | ||
| main.go | ||
| workload.go | ||