Skip to content

feat(gemini): support gemini-decision-1 on /v1/decisions and /v1/systemone (#51220) [lts/1.108.x] - #53696

Merged
mateo-berri merged 15 commits into
BerriAI:lts/1.108.xfrom
martenj4:litellm_backport_51220_lts_1_108_x
Nov 23, 2026
Merged

mateo-berri merged 15 commits into
BerriAI:lts/1.108.xfrom
martenj4:litellm_backport_51220_lts_1_108_x

Conversation

@martenj4

@martenj4 martenj4 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #51220 to lts/1.108.x, so LTS users can call gemini/gemini-decision-1 on /v1/decisions and /v1/systemone with its cost computed. Today the LTS proxy answers 400 with "Unknown Decisions provider 'gemini'"

Details

TLDR

Problem this solves:

  • gemini/ is not a decisions provider on 1.108, so both routes return 400

How it solves it:

Intentional product changes, all matching main:

  • A caller base_url now redirects every Decisions provider the way a caller api_base already did on the line, so a deployment opted into base_url alone honors it. A deployment's own api_base still wins. The proxy still refuses both unless allow_client_side_credentials or a per-deployment opt-in allows them
  • Through fix(decisions): preserve missing native usage (#48147) #48261, every Decisions provider answers usage: null on /v1/systemone instead of zeros when it sends no usage. Those calls get no cost headers. /v1/decisions still reports zeros
  • A provider reply that fails validation answers 500 with a short summary. The line answered 408 when that reply read "Request timed out", since its error echoed the reply text

User Flow

Before: a developer with a gemini/gemini-decision-1 deployment on 1.108 cannot use it

  1. They send POST http://localhost:4000/v1/decisions with a predicate question
  2. The proxy answers 400 Unknown Decisions provider 'gemini', same for /v1/systemone

After: the same request returns a calibrated answer

  1. They send the same POST http://localhost:4000/v1/decisions
  2. The proxy answers 200 with a probability per question and 0 output tokens, same for /v1/systemone

Linear ticket

Resolves LIT-10909

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally
  • My PR passes all required CI/CD checks
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Screenshots / Proof of Fix

Both proxies ran the config below with --num_workers 2, no database, and real Gemini and TypeSafe keys. $LPORT is a local listener that mimics both and logs each path and key, printing only synthetic keys. allow_client_side_credentials is off, so only opted-in deployments take a caller URL

Proxy config
model_list:
  - model_name: gemini-decisions
    litellm_params:
      model: gemini/gemini-decision-1
      api_key: os.environ/GEMINI_EAP_API_KEY
  - model_name: gemini-optin
    litellm_params:
      model: gemini/gemini-decision-1
      api_key: os.environ/GEMINI_EAP_API_KEY
      configurable_clientside_auth_params: ["api_base", "base_url"]
  - model_name: gemini-pinned
    litellm_params:
      model: gemini/gemini-decision-1
      api_key: deployment-synthetic-key
      api_base: http://127.0.0.1:$LPORT/deployment
      configurable_clientside_auth_params: ["api_base", "base_url"]
  - model_name: typesafe-decisions
    litellm_params:
      model: typesafe/jev-latest
      api_key: os.environ/TYPESAFE_API_KEY
  - model_name: typesafe-nousage
    litellm_params:
      model: typesafe/jev-latest
      api_key: deployment-synthetic-key
      api_base: http://127.0.0.1:$LPORT/nousage
  - model_name: typesafe-malformed
    litellm_params:
      model: typesafe/jev-latest
      api_key: deployment-synthetic-key
      api_base: http://127.0.0.1:$LPORT/malformed
  - model_name: typesafe-noconf
    litellm_params:
      model: typesafe/jev-latest
      api_key: deployment-synthetic-key
      api_base: http://127.0.0.1:$LPORT/noconf
Case Before, cd35862 After, 707fe7b (tip)
Gemini /v1/decisions 400 unknown provider 200, cost 9.3e-06
Gemini /v1/systemone 400 unknown provider 200 with its model, cost 9.3e-06
Caller URL and key, no opt-in 401, 401 401, 401
Opt-in, caller URL, no key 400 unknown provider 400 asks for api_key
Listener log so far empty empty
Opt-in, caller URL and key 400 unknown provider 200 at caller URL
Pinned api_base, caller base_url and key 400 unknown provider 200 at deployment URL
Key the listener got none caller key, 3 of 3
TypeSafe, real 200, cost 1.16e-05 200, cost 1.16e-05
TypeSafe, no usage sent zero usage, no cost usage: null, no cost
TypeSafe, malformed reply 408 500
TypeSafe, no confidence sent 500 500, same message
Gemini input_json 400 unknown provider 400 names input_json
Gemini input_json, drop_params 400 unknown provider 200, cost 9.3e-06

Caller URL rows ran with api_base and with base_url

Before, commands and raw output
# litellm cd35862b018, proxy on $PORT with --num_workers 2, a listener on 127.0.0.1:$LPORT that answers like Gemini or TypeSafe and logs the path and which key arrived

$ curl -s -D h.txt -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":"The sky is blue","questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"error":{"message":"litellm.BadRequestError: Unknown Decisions provider 'gemini'. Supported providers: openai, openrouter, azure, azure_ai, perplexity, typesafe, strands_decider, laya, bespoke, cloudflare, fireworks_ai, databricks, litellm_proxy, hosted_vllm, vercel_ai_gateway\n\nLiteLLM: model group 'gemini-decisions' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ grep -i '^x-litellm-response-cost:' h.txt
x-litellm-response-cost: 0

$ curl -s -D h.txt -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","state":"The sky is blue","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"error":{"message":"litellm.BadRequestError: Unknown Decisions provider 'gemini'. Supported providers: openai, openrouter, azure, azure_ai, perplexity, typesafe, strands_decider, laya, bespoke, cloudflare, fireworks_ai, databricks, litellm_proxy, hosted_vllm, vercel_ai_gateway\n\nLiteLLM: model group 'gemini-decisions' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ grep -i '^x-litellm-response-cost:' h.txt
x-litellm-response-cost: 0

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":"The sky is blue","api_base":"http://127.0.0.1:'$LPORT'","api_key":"caller-synthetic-key","questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"error":{"message":"Authentication Error, Rejected Request: api_base is not allowed in request body. Clientside passthrough requires explicit admin opt-in via either `general_settings.allow_client_side_credentials = true` (proxy-wide) or `configurable_clientside_auth_params` on the deployment in your proxy config.yaml. Relevant Issue: https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997","type":"auth_error","param":"None","code":"401"}}
HTTP 401

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":"The sky is blue","base_url":"http://127.0.0.1:'$LPORT'","api_key":"caller-synthetic-key","questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"error":{"message":"Authentication Error, Rejected Request: base_url is not allowed in request body. Clientside passthrough requires explicit admin opt-in via either `general_settings.allow_client_side_credentials = true` (proxy-wide) or `configurable_clientside_auth_params` on the deployment in your proxy config.yaml. Relevant Issue: https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997","type":"auth_error","param":"None","code":"401"}}
HTTP 401

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-optin","state":"The sky is blue","api_base":"http://127.0.0.1:'$LPORT'","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"error":{"message":"litellm.BadRequestError: Unknown Decisions provider 'gemini'. Supported providers: openai, openrouter, azure, azure_ai, perplexity, typesafe, strands_decider, laya, bespoke, cloudflare, fireworks_ai, databricks, litellm_proxy, hosted_vllm, vercel_ai_gateway\n\nLiteLLM: model group 'gemini-optin' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-optin","state":"The sky is blue","base_url":"http://127.0.0.1:'$LPORT'","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"error":{"message":"litellm.BadRequestError: Unknown Decisions provider 'gemini'. Supported providers: openai, openrouter, azure, azure_ai, perplexity, typesafe, strands_decider, laya, bespoke, cloudflare, fireworks_ai, databricks, litellm_proxy, hosted_vllm, vercel_ai_gateway\n\nLiteLLM: model group 'gemini-optin' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ cat listener_$label.log

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-optin","state":"The sky is blue","api_base":"http://127.0.0.1:'$LPORT'","api_key":"caller-synthetic-key","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"error":{"message":"litellm.BadRequestError: Unknown Decisions provider 'gemini'. Supported providers: openai, openrouter, azure, azure_ai, perplexity, typesafe, strands_decider, laya, bespoke, cloudflare, fireworks_ai, databricks, litellm_proxy, hosted_vllm, vercel_ai_gateway\n\nLiteLLM: model group 'gemini-optin' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-optin","state":"The sky is blue","base_url":"http://127.0.0.1:'$LPORT'","api_key":"caller-synthetic-key","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"error":{"message":"litellm.BadRequestError: Unknown Decisions provider 'gemini'. Supported providers: openai, openrouter, azure, azure_ai, perplexity, typesafe, strands_decider, laya, bespoke, cloudflare, fireworks_ai, databricks, litellm_proxy, hosted_vllm, vercel_ai_gateway\n\nLiteLLM: model group 'gemini-optin' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-pinned","state":"The sky is blue","base_url":"http://127.0.0.1:'$LPORT'/caller","api_key":"caller-synthetic-key","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"error":{"message":"litellm.BadRequestError: Unknown Decisions provider 'gemini'. Supported providers: openai, openrouter, azure, azure_ai, perplexity, typesafe, strands_decider, laya, bespoke, cloudflare, fireworks_ai, databricks, litellm_proxy, hosted_vllm, vercel_ai_gateway\n\nLiteLLM: model group 'gemini-pinned' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ cat listener_$label.log

$ curl -s -D h.txt -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"typesafe-decisions","state":"The sky is blue","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"model":"jev-1.14.0","answers":{"blue":{"type":"noul","noul":0.95}},"usage":{"input_tokens":277,"output_tokens":20}}
HTTP 200

$ grep -i '^x-litellm-response-cost:' h.txt
x-litellm-response-cost: 1.1633999999999999e-05

$ curl -s -D h.txt -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"typesafe-nousage","state":"The sky is blue","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"model":"jev-1.14.0","answers":{"blue":{"type":"noul","noul":0.5}},"usage":{"input_tokens":0,"output_tokens":0}}
HTTP 200

$ grep -i '^x-litellm-response-cost:' h.txt

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"typesafe-malformed","state":"The sky is blue","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"error":{"message":"litellm.Timeout: APITimeoutError - Request timed out. Error_str: Decisions provider 'typesafe' returned an unexpected response: 1 validation error for DecisionsResponse\nanswers\n  Input should be a valid dictionary [type=dict_type, input_value='Request timed out', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.13/v/dict_type\n\nLiteLLM: model group 'typesafe-malformed' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"408"}}
HTTP 408

# input_json on Gemini, with and without drop_params
$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":[{"role":"user","content":[{"type":"input_text","text":"The sky is blue"},{"type":"input_json","data":{"color":"red"}}]}],"questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"error":{"message":"litellm.BadRequestError: Unknown Decisions provider 'gemini'. Supported providers: openai, openrouter, azure, azure_ai, perplexity, typesafe, strands_decider, laya, bespoke, cloudflare, fireworks_ai, databricks, litellm_proxy, hosted_vllm, vercel_ai_gateway\n\nLiteLLM: model group 'gemini-decisions' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ curl -s -D h.txt -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","drop_params":true,"input":[{"role":"user","content":[{"type":"input_text","text":"The sky is blue"},{"type":"input_json","data":{"color":"red"}}]}],"questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"error":{"message":"litellm.BadRequestError: Unknown Decisions provider 'gemini'. Supported providers: openai, openrouter, azure, azure_ai, perplexity, typesafe, strands_decider, laya, bespoke, cloudflare, fireworks_ai, databricks, litellm_proxy, hosted_vllm, vercel_ai_gateway\n\nLiteLLM: model group 'gemini-decisions' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ grep -i '^x-litellm-response-cost:' h.txt
x-litellm-response-cost: 0

# the missing confidence case, run on its own

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"typesafe-noconf","state":"The sky is blue","questions":{"color":{"type":"choice","instructions":"Which color?","criteria":{"blue":"blue sky","green":"green sky"}}}}'
{"error":{"message":"litellm.InternalServerError: TypesafeException - Decisions provider 'typesafe' returned an unexpected response: a choice or score answer has no confidence\n\nLiteLLM: model group 'typesafe-noconf' failed with the error above. No fallback was attempted.","type":"internal_server_error","param":null,"code":"500"}}
HTTP 500
After, commands and raw output
# litellm 707fe7bfaf8, proxy on $PORT with --num_workers 2, a listener on 127.0.0.1:$LPORT that answers like Gemini or TypeSafe and logs the path and which key arrived

$ curl -s -D h.txt -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":"The sky is blue","questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"model":"gemini/gemini-decision-1","answers":[{"type":"predicate","name":"blue","probability":0.9631184329075245}],"usage":{"input_tokens":93,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":93}}
HTTP 200

$ grep -i '^x-litellm-response-cost:' h.txt
x-litellm-response-cost: 9.299999999999999e-06

$ curl -s -D h.txt -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","state":"The sky is blue","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"model":"gemini/gemini-decision-1","answers":{"blue":{"type":"noul","noul":0.9631184329075245,"confidence":0.9631184329075245}},"usage":{"input_tokens":93,"output_tokens":0,"total_input_tokens":93,"total_output_tokens":0,"total_tokens":93,"input_tokens_by_modality":[{"modality":"text","tokens":93}]}}
HTTP 200

$ grep -i '^x-litellm-response-cost:' h.txt
x-litellm-response-cost: 9.299999999999999e-06

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":"The sky is blue","api_base":"http://127.0.0.1:'$LPORT'","api_key":"caller-synthetic-key","questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"error":{"message":"Authentication Error, Rejected Request: api_base is not allowed in request body. Clientside passthrough requires explicit admin opt-in via either `general_settings.allow_client_side_credentials = true` (proxy-wide) or `configurable_clientside_auth_params` on the deployment in your proxy config.yaml. Relevant Issue: https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997","type":"auth_error","param":"None","code":"401"}}
HTTP 401

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":"The sky is blue","base_url":"http://127.0.0.1:'$LPORT'","api_key":"caller-synthetic-key","questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"error":{"message":"Authentication Error, Rejected Request: base_url is not allowed in request body. Clientside passthrough requires explicit admin opt-in via either `general_settings.allow_client_side_credentials = true` (proxy-wide) or `configurable_clientside_auth_params` on the deployment in your proxy config.yaml. Relevant Issue: https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997","type":"auth_error","param":"None","code":"401"}}
HTTP 401

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-optin","state":"The sky is blue","api_base":"http://127.0.0.1:'$LPORT'","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"error":{"message":"litellm.BadRequestError: When overriding api_base for Gemini Decisions, supply an explicit api_key to prevent sending the shared Google key to a custom host\n\nLiteLLM: model group 'gemini-optin' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-optin","state":"The sky is blue","base_url":"http://127.0.0.1:'$LPORT'","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"error":{"message":"litellm.BadRequestError: When overriding api_base for Gemini Decisions, supply an explicit api_key to prevent sending the shared Google key to a custom host\n\nLiteLLM: model group 'gemini-optin' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ cat listener_$label.log

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-optin","state":"The sky is blue","api_base":"http://127.0.0.1:'$LPORT'","api_key":"caller-synthetic-key","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"model":"gemini-decision-1","answers":{"blue":{"type":"noul","noul":0.5}},"usage":null}
HTTP 200

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-optin","state":"The sky is blue","base_url":"http://127.0.0.1:'$LPORT'","api_key":"caller-synthetic-key","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"model":"gemini-decision-1","answers":{"blue":{"type":"noul","noul":0.5}},"usage":null}
HTTP 200

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-pinned","state":"The sky is blue","base_url":"http://127.0.0.1:'$LPORT'/caller","api_key":"caller-synthetic-key","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"model":"gemini-decision-1","answers":{"blue":{"type":"noul","noul":0.5}},"usage":null}
HTTP 200

$ cat listener_$label.log
POST /v1beta/decisions x-goog-api-key=caller-synthetic-key authorization=none
POST /v1beta/decisions x-goog-api-key=caller-synthetic-key authorization=none
POST /deployment/v1beta/decisions x-goog-api-key=caller-synthetic-key authorization=none

$ curl -s -D h.txt -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"typesafe-decisions","state":"The sky is blue","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"model":"jev-1.14.0","answers":{"blue":{"type":"noul","noul":0.96}},"usage":{"input_tokens":277,"output_tokens":20}}
HTTP 200

$ grep -i '^x-litellm-response-cost:' h.txt
x-litellm-response-cost: 1.1633999999999999e-05

$ curl -s -D h.txt -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"typesafe-nousage","state":"The sky is blue","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"model":"jev-1.14.0","answers":{"blue":{"type":"noul","noul":0.5}},"usage":null}
HTTP 200

$ grep -i '^x-litellm-response-cost:' h.txt

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"typesafe-malformed","state":"The sky is blue","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"error":{"message":"litellm.InternalServerError: TypesafeException - Decisions provider 'typesafe' returned an unexpected response: DecisionsResponse answers: Input should be a valid dictionary\n\nLiteLLM: model group 'typesafe-malformed' failed with the error above. No fallback was attempted.","type":"internal_server_error","param":null,"code":"500"}}
HTTP 500

# input_json on Gemini, with and without drop_params
$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":[{"role":"user","content":[{"type":"input_text","text":"The sky is blue"},{"type":"input_json","data":{"color":"red"}}]}],"questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"error":{"message":"litellm.UnsupportedParamsError: gemini does not support parameters: ['input_json'], for model=gemini/gemini-decision-1. To drop these, set `litellm.drop_params=True` or for proxy:\n\n`litellm_settings:\n drop_params: true`\n\n\nLiteLLM: model group 'gemini-decisions' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400

$ curl -s -D h.txt -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","drop_params":true,"input":[{"role":"user","content":[{"type":"input_text","text":"The sky is blue"},{"type":"input_json","data":{"color":"red"}}]}],"questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"model":"gemini/gemini-decision-1","answers":[{"type":"predicate","name":"blue","probability":0.9631184329075245}],"usage":{"input_tokens":93,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":93}}
HTTP 200

$ grep -i '^x-litellm-response-cost:' h.txt
x-litellm-response-cost: 9.299999999999999e-06

# the missing confidence case, run on its own

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"typesafe-noconf","state":"The sky is blue","questions":{"color":{"type":"choice","instructions":"Which color?","criteria":{"blue":"blue sky","green":"green sky"}}}}'
{"error":{"message":"litellm.InternalServerError: TypesafeException - Decisions provider 'typesafe' returned an unexpected response: a choice or score answer has no confidence\n\nLiteLLM: model group 'typesafe-noconf' failed with the error above. No fallback was attempted.","type":"internal_server_error","param":null,"code":"500"}}
HTTP 500
Tip-only cases, commands and raw output

These rows ran only at the tip, since the line answers 400 to every Gemini call. The last allows the listener host in user_url_allowed_hosts

Case at 707fe7b Result
Pinned api_base, caller api_base and key 200 at caller URL
Opt-in /v1/decisions, caller URL and key 200 at caller URL
Gemini choice and score 200, 200
Remote image 200, cost 1.15e-04
21 MB image 400 over the 20 MiB budget
# litellm 707fe7bfaf8, proxy on $PORT with --num_workers 2, a listener on 127.0.0.1:$LPORT that answers like Gemini or TypeSafe and logs the path and which key arrived

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/systemone -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-pinned","state":"The sky is blue","api_base":"http://127.0.0.1:'$LPORT'/caller","api_key":"caller-synthetic-key","questions":{"blue":{"type":"noul","instructions":"Is the input about something blue?"}}}'
{"model":"gemini-decision-1","answers":{"blue":{"type":"noul","noul":0.5}},"usage":null}
HTTP 200

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-optin","input":"The sky is blue","api_base":"http://127.0.0.1:'$LPORT'","api_key":"caller-synthetic-key","questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"model":"gemini-decision-1","answers":[{"type":"predicate","name":"blue","probability":0.5}],"usage":{"input_tokens":0,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":0}}
HTTP 200

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-optin","input":"The sky is blue","base_url":"http://127.0.0.1:'$LPORT'","api_key":"caller-synthetic-key","questions":[{"type":"predicate","name":"blue","instructions":"Is the input about something blue?"}]}'
{"model":"gemini-decision-1","answers":[{"type":"predicate","name":"blue","probability":0.5}],"usage":{"input_tokens":0,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":0}}
HTTP 200

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":"The sky is blue","questions":[{"type":"choice","name":"color","instructions":"Which color is the sky in the input?","choices":[{"value":"blue"},{"value":"green"}]}]}'
{"model":"gemini/gemini-decision-1","answers":[{"type":"choice","name":"color","choice":"blue","probabilities":[{"value":"blue","probability":0.9954156672784049},{"value":"green","probability":0.004584332721594979}],"confidence":0.9954156672784049}],"usage":{"input_tokens":91,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":91}}
HTTP 200

$ curl -s -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":"The sky is blue","questions":[{"type":"score","name":"sure","instructions":"How sure is the input about the sky color?","levels":[{"label":"unsure"},{"label":"somewhat"},{"label":"certain"}]}]}'
{"model":"gemini/gemini-decision-1","answers":[{"type":"score","name":"sure","score":1.9612202162489827,"probabilities":[{"value":0,"label":"unsure","probability":0.00565095680481795},{"value":1,"label":"somewhat","probability":0.027477870141381158},{"value":2,"label":"certain","probability":0.9668711730538008}],"confidence":0.9668711730538008}],"usage":{"input_tokens":105,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":105}}
HTTP 200

$ curl -s -D h.txt -w '\nHTTP %{http_code}\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":[{"role":"user","content":[{"type":"input_image","image_url":"https://raw.githubusercontent.com/BerriAI/litellm/main/litellm/proxy/logo.png"}]}],"questions":[{"type":"predicate","name":"logo","instructions":"Does the image show a logo?"}]}'
{"model":"gemini/gemini-decision-1","answers":[{"type":"predicate","name":"logo","probability":0.8527376764259917}],"usage":{"input_tokens":1155,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":1155}}
HTTP 200

$ grep -i '^x-litellm-response-cost:' h.txt
x-litellm-response-cost: 0.00011549999999999999

$ curl -s -w '\nHTTP %{http_code} in %{time_total}s\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":[{"role":"user","content":[{"type":"input_image","image_url":"http://127.0.0.1:'$LPORT'/big.png"}]}],"questions":[{"type":"predicate","name":"logo","instructions":"Does the image show a logo?"}]}'
{"error":{"message":"litellm.BadRequestError: Error: Unable to fetch image from URL. The proxy could not resolve this host or its URL policy rejected it; an admin can check the proxy log and `user_url_allowed_hosts` in litellm_settings. url=http://REDACTED:27642/big.png\n\nLiteLLM: model group 'gemini-decisions' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400 in 0.147155s

$ cat listener_$label.log
POST /v1beta/decisions x-goog-api-key=caller-synthetic-key authorization=none
POST /v1beta/decisions x-goog-api-key=caller-synthetic-key authorization=none
POST /deployment/v1beta/decisions x-goog-api-key=caller-synthetic-key authorization=none
POST /nousage/v1/systemone x-goog-api-key=none authorization=Bearer deployment-synthetic-key
POST /malformed/v1/systemone x-goog-api-key=none authorization=Bearer deployment-synthetic-key
POST /malformed/v1/systemone x-goog-api-key=none authorization=Bearer deployment-synthetic-key
POST /malformed/v1/systemone x-goog-api-key=none authorization=Bearer deployment-synthetic-key
POST /caller/v1beta/decisions x-goog-api-key=caller-synthetic-key authorization=none
POST /v1beta/decisions x-goog-api-key=caller-synthetic-key authorization=none
POST /v1beta/decisions x-goog-api-key=caller-synthetic-key authorization=none

# the same proxy with this added to the config

litellm_settings:
  user_url_allowed_hosts: ["127.0.0.1"]

$ curl -s -w '\nHTTP %{http_code} in %{time_total}s\n' localhost:$PORT/v1/decisions -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"model":"gemini-decisions","input":[{"role":"user","content":[{"type":"input_image","image_url":"http://127.0.0.1:'$LPORT'/big.png"}]}],"questions":[{"type":"predicate","name":"logo","instructions":"Does the image show a logo?"}]}'
{"error":{"message":"litellm.BadRequestError: Image download exceeds the remaining request budget of 20971520 bytes\n\nLiteLLM: model group 'gemini-decisions' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}
HTTP 400 in 2.793005s

$ cat listener_$label.log
GET /big.png 22020104 bytes
Tests and gates
decisions, router, utils, cost, Prometheus unit tests at 75d469b96a   2607 passed
decisions, Gemini, Vertex and media unit tests at 707fe7bfaf          4444 passed, 33 skipped
affected unit tests at 739be2b9ee                                     103644 passed, 37 red, of which 11 also fail on 67c4edeaa8 and 26 pass when rerun
decisions integration lane at 75d469b96a                              91 passed, 1 skipped
make check BASE_REF=origin/lts/1.108.x at 707fe7bfaf                  PASS

The 37 are listed with both reruns in affected_unit_tests.txt

main commit LTS commit
6896d80 3b49309
e1de5bd 3b49309
3e1fbf9 3b49309
5743050 3b49309
6f0e6a9 3b49309
7be92ec 3b49309
3e10a86 3b49309
13f453c 3b49309
2d082b5 3b49309 c43fbfb 5c40308
6b83e79 830405d
212219e c183717
b828c1b (#53195) 739be2b

Other open lts/1.108.x PRs, #52147 and #53585 the closest, share router.py, utils.py or the cost maps. None of them ships Gemini Decisions

/live-pr-risk on the non-pick commits (75d469b, 5c40308, c43fbfb, c43d64e) at 707fe7b

c43d64e87d resolves image_handling.py as main has it, the line's uncompressed-only download plus this PR's size budget. Breaking: none found. Backward incompatible: none from these commits. The three changes under Intentional product changes come from the picks and are on main through #48261, #47508 and #48505

Same rig as above plus a litellm_proxy hop to the same proxy, a group with Gemini and openai/gpt-6-luna, and a gemini/gemini-3.8-flash chat deployment reading clips and images from a local media server, both legs with real keys. Raw output, before and after

Dependent Before, cd35862 After, 707fe7b
Hop to Gemini, /v1/decisions and /v1/systemone 400, 400 200, 200, cost 9.3e-06 each
Hop to Gemini, input_json with drop_params 400 200, cost 9.3e-06
Hop to TypeSafe, both routes 200, cost 1.16e-05 same
Hop, no usage sent, /v1/systemone zero usage usage: null (#48261)
Hop, no usage sent, /v1/decisions 200, zeros same
Hop, no confidence sent 500, 9 upstream posts same
Hop, malformed reply 408, 9 upstream posts 500, 9 upstream posts (#47508)
OpenAI alone 200, cost 1.59e-05 same
Mixed group, input_json, 6 calls 6 answered by OpenAI same
TypeSafe opt-in, caller api_base and key 200 with the caller key same
Non-decisions provider, caller api_base or not 400, 400 same
Chat video, 0.8 MB, again, and 22.9 MB 200, 200, 200 same
Chat video sent gzipped 400 could not download same
Chat video over the 50 MB cap, plain and drop_params 400 could not download, 200 without the video same
Video in a tool result, 0.8 MB, gzipped, over the cap, over with drop_params 200, 400, 400, 200 without the video same
Chat image 200 same
Decisions image, plain and gzipped 400 unknown provider 200, 200

Regression risk: a use_litellm_proxy Gemini deployment was not run live. Not verified: spend rows, since the rig had no database. These commits do not touch them

Type

🆕 New Feature

Caveats (if any)

High

  • A pre-existing credential gap, also on main, went to security engineering

Medium

  • Remote images have live proxy coverage. Inline audio and video remain unit tested
  • A compressed remote image can outgrow the async download budget in memory before rejection. Same on main, fix tracked there first
  • A use_litellm_proxy deployment whose model prefix has no Decisions support answers 400 instead of forwarding when the caller sends api_base. Same on main, fix tracked there first
  • PDFs and remote audio or video URLs have no shared decisions input type yet
  • Box questions answer 400, since Gemini has no box question
  • A Gemini deployment with a config api_base and its key only in GEMINI_API_KEY answers 400 on every call
    • Same on main. Setting api_key: os.environ/GEMINI_API_KEY or using GEMINI_API_BASE avoids it
  • With a deployment api_base, a caller base_url is ignored, yet the Gemini check still wants api_key, which then goes to the deployment host. Same on main

Low

  • The cost map row lists only /v1/decisions, so the public model hub hides /v1/systemone, which works. Same on main
  • The logged Gemini request is the SystemOne shape, not the body Google receives once remote images are inlined. Same on main
  • A score answer whose legend is a list still answers 500 on the line, while main accepts it since feat: add Nace Drex decisions provider #46523. Neither Gemini nor TypeSafe sends one
  • x-litellm-model-api-base shows Gemini's generateContent URL instead of /v1beta/decisions. Same on main
  • The Intentional product changes reach every Decisions provider, not only Gemini. Same on main
Decisions
Bugbot summary

[!NOTE]
Medium Risk
Touches shared Decisions routing, credential validation, usage/cost handling, and image download paths across providers—not only Gemini—so regressions could affect cost headers, router behavior, and multimodal decisions calls.

Overview
Adds GeminiDecisionsConfig so gemini/gemini-decision-1 works on /v1/decisions and /v1/systemone, including pricing in the model cost map and multimodal request shaping (text, image, audio, video) toward Gemini’s /v1beta/decisions endpoint.

Gemini-specific behavior: remote images respect a 20 MiB total budget via bounded downloads; custom api_base/base_url requires an explicit api_key so shared Google env keys are not sent to custom hosts; the router runs the same connection check before merging deployment credentials. Caller base_url is treated as api_base for all Decisions providers.

Cross-provider Decisions hardening: provider usage is optional—missing usage surfaces as usage: null on SystemOne and blocks cost calculation instead of inventing zeros; malformed upstream replies raise DecisionsResponseValidationError mapped to 500 with concise field summaries (replacing misleading timeout-style errors). Image fetch helpers gain optional max_bytes limits for budgeted downloads.

Reviewed by Cursor Bugbot for commit 707fe7b. Bugbot is set up for automated code reviews on this repo. Configure here.

jesus-berri and others added 15 commits November 12, 2026 05:33
…/decisions and /v1/systemone (BerriAI#46539)

Backport of BerriAI#46539 to lts/1.108.x (prerequisite of BerriAI#51220).
Cherry-picked from caad4d6 (main).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Backport of BerriAI#47508 to lts/1.108.x (prerequisite of BerriAI#51220).
Cherry-picked from 81d8c9a (main).
Minimal hand-port of response validation, omitting unrelated pricing and observability changes.

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

Backport of BerriAI#48261 to lts/1.108.x (prerequisite of BerriAI#51220).
Cherry-picked from cb65a21 (main).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…emone (BerriAI#51220)

* feat(gemini): add Decisions API support

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

* fix(gemini): add Decisions quotas and test package marker

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

* fix(gemini): bound decisions image downloads

* fix(gemini): preserve image order and bounded cache reuse

* test(gemini): cover cached image budgets and text messages

* refactor(gemini): iterate bounded image downloads

* fix(gemini): require explicit keys for decisions base overrides

* refactor(gemini): infer downloaded image types

* test(proxy): accept either metrics startup failure on occupied ports

* fix(llms-types): remove duplicate compact beta match arm

* fix(gemini): validate caller credentials before merging deployment keys

---------

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

Backport of BerriAI#51220 to lts/1.108.x.
Cherry-picked from 7461a99 (main).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Canonicalize caller connection overrides before reading deployment defaults, retaining the pre-merge credential guard in both router paths. Cover both URL parameter names and both Decisions surfaces in sync and async calls.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The Gemini Decisions model introduced by the backport uses the decisions mode already accepted on main. Extend the LTS schema validator to match.

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

# Conflicts:
#	litellm/llms/openrouter/decisions/transformation.py
#	tests/unit/decisions/test_main.py
… on main

Drop the Router override that let a caller base_url replace a deployment's
own api_base. Main's prepare_call reads base_url only when no api_base is
set, and the router now merges the caller kwargs the same way, so the LTS
line matches main's precedence.

Also drop the list-form score legend normalization from the BerriAI#47508 port.
It came from BerriAI#46523 on main, and neither LTS provider that reaches it
(Gemini, TypeSafe) sends a list legend.

Cover the sync Router credential guard for both URL parameter names.
…rt_51220_lts_1_108_x

Keeps main's DecisionsResponseValidationError beside the line's input_json, safety_identifier and missing-confidence handling, and ports BerriAI#52805's Gemini hunk so Gemini skips input_json parts the line now has
Gemini's systemone answers carry no model, so a direct call and a litellm_proxy hop answered model null while the decisions shape answered gemini/gemini-decision-1. A Gemini systemone call now fills in the provider and model it was sent to when the answer leaves it out

(cherry picked from commit b828c1b)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…rt_51220_lts_1_108_x

# Conflicts:
#	litellm/litellm_core_utils/prompt_templates/image_handling.py
@CLAassistant

CLAassistant commented Nov 23, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ mateo-berri
✅ jesus-berri
❌ ishaan-j-berri
You have signed the CLA already but the status is still pending? Let us recheck it.

@veria-ai

veria-ai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

The PR adds support for gemini-decision-1 on the /v1/decisions and /v1/systemone endpoints, with changes touching image handling.

One issue remains open in the asynchronous image reader: compressed responses can expand in memory before the response-size budget is enforced. A small compressed response was demonstrated to cause allocations well beyond that budget before rejection, creating a potential resource-exhaustion path when compressed image responses are processed. No issues have been addressed yet.

Open issues (1)

Fixed/addressed: 0 · PR risk: 5/10

Reviews

follow_redirects=follow_redirects,
timeout=USE_CLIENT_DEFAULT if timeout is None else timeout,
) as response:
return _with_body_prefix(response, await anext(response.aiter_bytes(max_response_bytes), b""))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium: Compressed images bypass the memory budget

aiter_bytes(max_response_bytes) caps yielded chunk size, not decompression: HTTPX expands each raw chunk before slicing it, and this reader still accepts compressed responses (a streaming check expanded a 32 KB gzip response to 32 MiB, with roughly 128 MiB peak allocations, before the 20 MiB budget check rejected it). Request Accept-Encoding: identity and reject non-identity Content-Encoding before reading, as the sync reader does, or use a bounded decoder.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid, and main has the same reader. The fix is tracked to land on main first and then this line, keeping both in step

@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.81132% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
litellm/llms/gemini/decisions/transformation.py 90.00% 9 Missing ⚠️
litellm/decisions/call.py 98.14% 1 Missing ⚠️
...ellm/llms/fireworks_ai/decisions/transformation.py 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No new blocking issue remains beyond the two explicitly deferred findings

Summary

Adds gemini/gemini-decision-1 support on /v1/decisions and /v1/systemone, including request conversion, usage, and pricing

  • Gemini models now answer both Decisions routes.
  • Gemini image requests stay within image count and size limits.
  • Decisions calls accept base_url and check custom Gemini credentials.
  • Decisions replies keep missing usage as null.
  • Malformed Decisions replies get a short server-error summary.
  • Prometheus startup tests stop matching exact error text.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["/v1/decisions or /v1/systemone"] --> B["Router checks caller URL and key"]
  B --> C["Build shared request"]
  C --> D["Check and inline images"]
  D --> E["Build Gemini request"]
  E --> F["Gemini /v1beta/decisions"]
  F --> G["Read answers and usage"]
  G --> H["Return caller's response shape"]
Loading

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/lts..." · Reviewed by Greptile

Comment thread litellm/router.py Resolved
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 707fe7b. Configure here.

@mateo-berri mateo-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mateo-berri
mateo-berri merged commit 48dfed2 into BerriAI:lts/1.108.x Nov 23, 2026
63 of 64 checks passed
shivamrawat1 added a commit to BerriAI/litellm-docs that referenced this pull request Nov 28, 2026
…on 1 (#3321)

The backport (BerriAI/litellm#53696) shipped gemini-decision-1 in v1.108.16 on the 1.108.x LTS line, but the availability table and the Gemini setup section only named v1.111.0-rc.1.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants