Repository navigation
feat(decisions): backport unified /v1/decisions endpoint (#44236) - #40
Merged
Merged
Conversation
Backport upstream BerriAI#44236 (8b1990b) onto the AI Pass 1.102.x release line. Adds POST /v1/decisions and /decisions routed by model group, litellm.decisions/adecisions, and Jev-compatible provider transformations for typesafe, openrouter, perplexity, cloudflare and strands_decider. Decision calls get virtual-key auth, budgets, SpendLogs and the x-litellm-response-cost header like chat completions. Adapted to 1.102.x: route allowlists wired in proxy/_types.py (no managed_authorization.py on this base), the lazy-feature route record reused, and the existing TypeSafe pass-through, Jev prices, Fal and Whisper costing left unchanged. Skipped: README table, upstream-only integration harness, generated OpenAPI snapshot and dashboard types. Co-Authored-By: Codex <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TrSWP5YNiQ4YuWWkZ4Um7H
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Backports upstream BerriAI#44236 (squash
8b1990b4bcc, merged to main 2026-10-03) onto our 1.102.1 release line. It is not in any upstream release yet.POST /v1/decisionsand/decisions, routed by model group through the Router.litellm.decisions/litellm.adecisionswith the Jev request/response schema (state+ namedchoice/score/noulquestions).typesafe/,openrouter/,perplexity/,cloudflare/,strands_decider/.x-litellm-response-costheader, the same as chat completions. AI Pass billing relies on that header and on SpendLogs.Adapted to 1.102.x
proxy/_types.py(this base has nomanaged_authorization.py).Tests
LITELLM_LOCAL_MODEL_COST_MAP=True uv run --no-sync python -m pytest -p no:postgresql tests/unit/decisions/ tests/unit/proxy/decisions_endpoints/ tests/test_litellm/proxy/pass_through_endpoints/ tests/test_litellm/test_typesafe_model_metadata.py tests/test_litellm/llms/fal_ai/test_cost_calculator.py tests/test_litellm/test_cost_calculator.py: 1002 passed. Codex also ran a wider selection: 1,040 regression and 119 routing tests passed.There are no DB migrations and no new runtime dependencies.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TrSWP5YNiQ4YuWWkZ4Um7H