litellm/tests/e2e
devin-ai-integration[bot] 2cf209f265
fix(mistral-ocr): forward the complete public parameter contract (#33600)
* fix(mistral-ocr): forward the complete public parameter contract

The Rust OCR path already lists id in the supported Mistral parameters, but litellm/ocr/main.py ran filter_out_litellm_params before handing optional_params to the bridge. That generic filter drops every key in all_litellm_params, which includes id, so the supported public Mistral OCR field id was silently stripped and never reached the provider while the rest of the contract went through.

Restore id after the generic filter via an OCR-specific reserved set, keeping genuine internal params filtered. Add Rust core and ai-gateway contract tests that pin the exact serialized request body for the full supported contract and prove internal canaries are dropped, a Python regression test that id survives while internal params do not, and a deterministic capture E2E plus a live Mistral param test.

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* test(mistral-ocr): drop unnecessary comments from parity tests

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* fix(mistral-ocr): only forward reserved id when set; harden capture e2e

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* refactor(mistral-ocr): typed queue-injected capture harness for e2e

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* test(mistral-ocr): fully type E2E capture models and move gateway ocr tests

Replace the remaining Any/coarse object wire types in the OCR E2E module
with concrete frozen Pydantic models for the supported-param contract,
internal canaries, upstream capture request, and normalized response, and
build every request payload immutably per call. The capture fixture now
cleans up on every failure path (terminate then always wait, kill then
always wait, shutdown plus server_close, join the server thread) and
requires an HTTP 200 liveness probe. The live Mistral test now exercises
the complete public parameter contract with valid json_schema annotation
formats. Move the ai-gateway OCR test module out of io/ocr.rs into a
focused io/ocr/tests.rs.

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* fix(mistral-ocr): drop reserved id upstream when null and type the E2E harness

Extend map_ocr_params so a null-valued reserved public id is omitted from the
serialized request, matching the Python OCR boundary for the standalone Axum
path where a caller can submit JSON id:null; add core map and serialized-body
tests for both the absent and null id cases. Extract the deterministic capture
harness into a typed ocr_capture_proxy helper module with an exception-safe
fixture that cleans up on every failure path from capture-server creation
onward (terminate then always wait, kill then always wait, shutdown plus
server_close, join the server thread, close logs after the process exits) and
requires an HTTP 200 liveness probe. Serialize wire payloads with by_alias so
the annotation schema/additionalProperties keys match the provider contract.
Replace the lambda internal canary in the Python bridge regression with a
serializable value and cover the litellm_session_id and tags internal fields.

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>
2026-07-16 20:25:22 -07:00
..
budgets test(e2e): drop xfail markers for the now-fixed team-budget-JSON and custom-pricing-leak bugs (#31249) 2026-06-24 18:51:10 -07:00
gateway fix(mistral-ocr): forward the complete public parameter contract (#33600) 2026-07-16 20:25:22 -07:00
llm_translation test(e2e): drop xfail markers for the now-fixed team-budget-JSON and custom-pricing-leak bugs (#31249) 2026-06-24 18:51:10 -07:00
spend_tracking test: add e2e tests for spend, budgets and llms (#30869) 2026-06-24 15:01:57 -07:00
conftest.py test: add e2e tests for spend, budgets and llms (#30869) 2026-06-24 15:01:57 -07:00
e2e_config.py test: add e2e tests for spend, budgets and llms (#30869) 2026-06-24 15:01:57 -07:00
e2e_gateway.py test: add e2e tests for spend, budgets and llms (#30869) 2026-06-24 15:01:57 -07:00
e2e_http.py test: add e2e tests for spend, budgets and llms (#30869) 2026-06-24 15:01:57 -07:00
lifecycle.py test: add e2e tests for spend, budgets and llms (#30869) 2026-06-24 15:01:57 -07:00
models.py test: add e2e tests for spend, budgets and llms (#30869) 2026-06-24 15:01:57 -07:00
pytest.ini test: add e2e tests for spend, budgets and llms (#30869) 2026-06-24 15:01:57 -07:00
test_lifecycle.py test: add e2e tests for spend, budgets and llms (#30869) 2026-06-24 15:01:57 -07:00
transport.py test: add e2e tests for spend, budgets and llms (#30869) 2026-06-24 15:01:57 -07:00