litellm/tests/test_litellm/interactions
Yassin Kortam ae74b06ae3
fix(tests): assert Content variants are identified by type, not by the discriminator keyword (#35161)
`test_content_schema_uses_discriminator` fetches Google's live Interactions
OpenAPI document and required an OpenAPI `discriminator` on the `Content` union.
Google has since dropped that keyword and now pins `type` with a `const` on each
variant instead, so the assertion fails on the current spec and the `misc` shard
is red on every open PR against staging

The information the transformation actually needs did not change: a content part
is still routed by reading its `type`, and each variant still declares exactly
one distinct value for it. So the test now asserts that property directly, and
accepts either spelling, a `discriminator` on the union or a `const` (or
single-value `enum`) on each member

It stays a real check rather than a weakened one. Against the live spec it fails
if TextContent loses its type property, if `text` is renamed, if two variants
claim the same type value, if `Content` stops being a union of named variants,
or if a discriminator appears on some property other than `type`
2026-07-29 17:49:30 -07:00
..
base_interactions_test.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_agents_http_handler.py Gemini managed agents support (#28270) 2026-05-19 16:02:03 -07:00
test_agents_main_and_utils.py Gemini managed agents support (#28270) 2026-05-19 16:02:03 -07:00
test_gemini_interactions.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_gemini_interactions_transformation.py fix(interactions): never drop streamed text deltas; always emit terminal completion (#28394) 2026-05-20 16:41:40 -07:00
test_google_interactions_integration.py chore: litellm oss staging (#30968) 2026-06-23 07:31:44 -07:00
test_interactions_streaming_iterator.py fix(responses): stop scheduling sync success_handler concurrently with async_success_handler (#32239) 2026-07-07 09:13:50 -07:00
test_litellm_responses_bridge.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_openapi_compliance.py fix(tests): assert Content variants are identified by type, not by the discriminator keyword (#35161) 2026-07-29 17:49:30 -07:00