litellm/type-discipline-budget.json
tin-berri 78ad88f52c
fix(responses): decode JSON-string tool schemas before sending to the provider (#39844)
* fix(responses): decode JSON-string tool schemas before sending to the provider

A caller that hands a tool schema over already JSON-encoded reached the
Responses API with a string `parameters`, and the provider rejected the
request with a 400 naming the routed model instead of the offending tool.
Decode it at the one place every Responses request converges, and refuse
anything that is neither an object nor a string encoding one.

Collapses the duplicated input/tool sanitization block shared by the
request and compact-request builders into a single owner, so the decode
cannot be wired into one path and not the other.

* test(responses): pin null tool schemas as accepted, and type the parametrized cases

The Responses API serves `parameters: null` and an omitted schema alike, so
neither may raise. Pin both against a future tightening, annotate the
parametrized inputs, and trim the docstrings back to what the code does not
already say.
2026-09-05 05:14:44 +00:00

38 lines
437 B
JSON

{
"LIT001": {
"limit": 22181
},
"LIT002": {
"limit": 26745
},
"LIT003": {
"limit": 261
},
"LIT004": {
"limit": 40
},
"LIT005": {
"limit": 0
},
"LIT006": {
"limit": 1035
},
"LIT007": {
"limit": 0
},
"LIT008": {
"limit": 945
},
"LIT009": {
"limit": 0
},
"LIT010": {
"limit": 16464
},
"LIT011": {
"limit": 5506
},
"LIT012": {
"limit": 4486
}
}