litellm/tests/unit/llms/openai_like
Vansh 0cc072c999
Some checks are pending
unit / rust-bridge-harness (push) Blocked by required conditions
unit / llms-providers (push) Blocked by required conditions
unit / proxy-endpoints (push) Blocked by required conditions
unit / proxy-feature-endpoints (push) Blocked by required conditions
unit / rust-bridge (push) Waiting to run
unit / assert-shard-coverage (push) Waiting to run
unit / enterprise-managed-files (push) Blocked by required conditions
unit / enterprise-repositories-secrets (push) Blocked by required conditions
unit / proxy-server (push) Blocked by required conditions
unit / lens-python-310 (push) Blocked by required conditions
unit / caching-local (push) Blocked by required conditions
unit / core-utils (push) Blocked by required conditions
unit / endpoints (push) Blocked by required conditions
unit / enterprise-package (push) Blocked by required conditions
unit / integrations (push) Blocked by required conditions
unit / llms-anthropic (push) Blocked by required conditions
unit / llms-bedrock (push) Blocked by required conditions
unit / llms-openai-meta (push) Blocked by required conditions
unit / llms-vertex-ai (push) Blocked by required conditions
unit / mcp-elicitation (push) Blocked by required conditions
unit / proxy-auth (push) Blocked by required conditions
unit / mcp-server (push) Blocked by required conditions
unit / proxy-extras (push) Blocked by required conditions
unit / proxy-hooks-client (push) Blocked by required conditions
unit / proxy-infra-db-spend (push) Blocked by required conditions
unit / proxy-infra-root-a-p (push) Blocked by required conditions
unit / proxy-infra-root-q-z (push) Blocked by required conditions
unit / docs (push) Waiting to run
unit / OpenAI 2.20.0 compatibility (push) Blocked by required conditions
unit / helm (push) Waiting to run
unit / OpenAI 3.0.0 compatibility (push) Blocked by required conditions
unit / OpenAI 3.25.0 compatibility (push) Blocked by required conditions
unit / redis-py 7.4.1 compatibility (push) Blocked by required conditions
unit / redis-py 5.3.1 compatibility (push) Blocked by required conditions
unit / redis-py 6.4.0 compatibility (push) Blocked by required conditions
unit / redis-py 8.0.1 compatibility (push) Blocked by required conditions
unit / coverage (push) Blocked by required conditions
unit / unit passed (push) Blocked by required conditions
GitHub Actions Security Analysis / zizmor (push) Waiting to run
CodSpeed Benchmarks / benchmarks (push) Waiting to run
Cost map pins recheck / rerun-cost-map-guard (push) Waiting to run
Publish lint base counts / publish (basedpyright, litellm/scripts/type_check_gate.py) (push) Waiting to run
Publish lint base counts / publish (openapi-docs, litellm/scripts/openapi_docs_gate.py) (push) Waiting to run
Publish lint base counts / publish (ruff-strict, litellm/scripts/ruff_strict_gate.py) (push) Waiting to run
Publish lint base counts / publish (test-quality, litellm/scripts/test_quality_gate.py) (push) Waiting to run
Publish lint base counts / publish (type-discipline, litellm/scripts/type_discipline_gate.py) (push) Waiting to run
Root entry limit / root-entry-limit (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
smoke / dashboard-build (push) Waiting to run
smoke / py3.10 (push) Waiting to run
smoke / py3.11 (push) Waiting to run
smoke / py3.12 (push) Waiting to run
smoke / py3.13 (push) Waiting to run
smoke / py3.14 (push) Waiting to run
smoke / py3.15 (push) Waiting to run
smoke / all-extras-py3.12 (push) Waiting to run
smoke / all-extras-py3.13 (push) Waiting to run
smoke / windows-sdk (push) Waiting to run
smoke / proxy-build-from-pip (push) Waiting to run
smoke / smoke passed (push) Blocked by required conditions
LiteLLM Rust DB / db-queries (push) Waiting to run
LiteLLM Rust / rust-lint (push) Waiting to run
LiteLLM Rust / rust-test (push) Waiting to run
LiteLLM Rust / rust-wheel (push) Waiting to run
unit / auth-checks (push) Blocked by required conditions
unit / budgets (push) Blocked by required conditions
unit / custom-logging (push) Blocked by required conditions
unit / endpoints-and-responses (push) Blocked by required conditions
unit / enterprise-routing (push) Blocked by required conditions
unit / jwt-and-keys (push) Blocked by required conditions
unit / key-generation (push) Blocked by required conditions
unit / logging-misc (push) Blocked by required conditions
unit / db-and-spend (push) Blocked by required conditions
unit / guardrails-hooks (push) Blocked by required conditions
unit / mcp-oauth (push) Blocked by required conditions
unit / proxy-runtime (push) Blocked by required conditions
unit / proxy-server-core (push) Blocked by required conditions
unit / root (push) Blocked by required conditions
unit / proxy-utils (push) Blocked by required conditions
unit / ui-unit (push) Waiting to run
unit / proxy-infra-routing (push) Blocked by required conditions
unit / proxy-subprocess (push) Blocked by required conditions
unit / responses-caching-types (push) Blocked by required conditions
unit / router (push) Blocked by required conditions
feat(litellm): add Vispark provider with Vision Small/Medium/Large (#41192)
* feat(litellm): add Vispark provider with Vision Small/Medium/Large

Rebased onto latest main: re-applied vispark registrations (model sets,
provider enum, JSON provider registry, pricing catalogs, dashboard
fields, endpoints matrix) and moved provider test to
tests/unit/llms/openai_like/ per current layout.

* fix(litellm): keep basedpyright reportUnknownArgumentType budget flat for vispark

* fix(litellm): satisfy type-discipline budget for vispark cast

* chore: retrigger CI (prior MCP dep-resolution leg cancelled by infra)

* test(vispark): cover routing, text completion and cost; sync endpoint matrix backup

* test(vispark): tolerate cost-map entries without a provider when listing models

* chore(vispark): regenerate the provider endpoint matrix with main's generator

* fix(vispark): bill the 600 input token minimum and bridge JSON schemas and PDF file parts

Vispark charges every request for at least 600 input tokens, so the cost map
gains min_billed_input_tokens and the generic cost path bills up to it.
Vispark answers 500 to a json_schema that sets additionalProperties, which the
OpenAI SDK always sends for a Pydantic model, so the provider strips it.
Vispark reads PDFs only as image_url parts, so file parts are sent that way.

* fix(vispark): bill the input token minimum under custom pricing and strip every additionalProperties value

* refactor(router): inline the billing minimum lookup into the deployment cost payload

* fix(vispark): scope the input minimum per deployment and reject map-field schemas

Keep a deployment's min_billed_input_tokens on its own cost-map entry so it
no longer changes billing for other deployments of the same backend model.
Strip boolean additionalProperties for Vispark, answer 400 for schema-valued
ones unless drop_params is set, and do it without recursion.

* fix(budget): reserve at least a deployment's billed input minimum

* test(budget): patch the renamed deployment info helper

* fix(vispark): reject file_id parts, keep properties named additionalProperties, bill the minimum on dashscope and perplexity

* fix(vispark): send inline file_data when a file part also carries a file_id

* fix: keep provider-stated cost for minimum-only deployments and skip the minimum without a counted prompt

A deployment that sets only min_billed_input_tokens no longer drops Perplexity or Kyma stated cost, streamed cost headers no longer bill the minimum before usage arrives, and tiered deployments now carry the minimum

* fix: bill provider-stated cost for minimum-only deployments and charge a disconnect only the group's shared minimum

* style: drop the restating comment on the vispark provider entry

* fix(cost): keep the provider-reported video cost for a deployment that sets only a billing minimum

* fix(cost): read the billing minimum the way the cost map guard accepts it

A cost map row can write min_billed_input_tokens as "600" or 600.0, which the
catalog's count parser accepts. The chat cost path subtracted the raw value and
raised TypeError on a string, and the custom-rate path billed no minimum unless
the value was an int. Both now read it through one non-negative int adapter

Also loosen the Scaleway file part test, since main now adds a default filename

* fix(vispark): keep schema literals and reserve at the short prompt's tier

Removing additionalProperties now skips the literal data in const, enum,
default and examples, so a value holding that key reaches Vispark unchanged

Budget reservation picks the pricing tier from the counted prompt and only then
applies the billed input minimum, the way billing does, so a minimum that
crosses into a cheaper tier no longer reserves less than the request bills

* fix(utils): list JSON providers whose API key env var differs from their name

* fix(vispark): answer 400 for a file part with no file instead of crashing

* fix(cost): use a deployment's own input minimum with per-token rates

/spend/calculate and /cost/estimate priced custom-rate deployments with the
cost map's min_billed_input_tokens, so a deployment that sets its own
minimum (0 or 1000, say) got a quote that differs from what its live
requests bill. Both endpoints now pass the deployment's minimum with the
rates, and the per-token floor also reads it from the requested model info
before falling back to the cost map

* chore(vispark): keep catalog and endpoint formatting aligned

* fix(vispark): mark provider registry reference final

* fix(vispark): reject missing provider credentials before fallback

* fix(vispark): preserve authenticated text completion clients

* fix(vispark): preserve authenticated chat completion clients

* fix(vispark): reject unused SDK credentials on HTTP transport

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-17 00:48:52 -08:00
..
chat fix(streaming): keep merged think tags balanced and split SSE lines only on CR/LF (#48755) 2026-10-28 17:00:29 -07:00
embedding test: migrate local_testing SDK and provider tests out of build_and_test (#45760) 2026-10-10 23:14:25 +00:00
messages refactor(anthropic): rename llms/anthropic/pass_through to llms/anthropic/messages (#48510) 2026-10-27 10:08:25 -07:00
responses
__init__.py
test_abliteration_provider.py feat(abliteration): add model pricing and capabilities (#48498) 2026-10-26 18:08:29 -07:00
test_aiand_provider.py fix(aiand)!: show ai&'s name and logo, and sync ai&'s model list (#49158) 2026-10-30 10:55:26 -07:00
test_assemblyai_provider.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_charity_engine.py
test_cognition_provider.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_coralbricks_provider.py feat(providers): add CoralBricks as a native provider (#44700) 2026-10-12 21:56:59 +00:00
test_cortecs_provider.py feat: generate provider_endpoints_support.json from the cost map (#48619) 2026-10-27 12:06:55 -07:00
test_dynamic_config.py feat: update EmpirioLabs models in model_prices_and_context_window.json (#49980) 2026-11-04 20:11:52 +00:00
test_empiriolabs_provider.py feat: update EmpirioLabs models in model_prices_and_context_window.json (#49980) 2026-11-04 20:11:52 +00:00
test_hostinger_router_provider.py feat!: add Hostinger Router as an OpenAI-compatible provider (#44863) 2026-10-31 00:38:45 -07:00
test_inferenceapis_provider.py feat(providers): add Inference APIs as OpenAI-compatible provider (#41669) 2026-10-15 08:17:36 -07:00
test_json_loader.py fix(crusoe): update base URL to current endpoint (#33121) 2026-10-15 19:10:58 -07:00
test_json_providers.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_kyma_provider.py fix(cost): split a provider-reported total between input and output by the cost map rate ratio (#49357) 2026-10-31 09:04:50 -07:00
test_libertai_provider.py feat: generate provider_endpoints_support.json from the cost map (#48619) 2026-10-27 12:06:55 -07:00
test_meta_provider.py
test_model_info.py
test_openinfer_provider.py refactor(cost-map): drop the legacy max_tokens field in favor of max_input_tokens and max_output_tokens (#48471) 2026-10-26 17:03:05 -07:00
test_pinstripes_provider.py
test_prism_provider.py feat: generate provider_endpoints_support.json from the cost map (#48619) 2026-10-27 12:06:55 -07:00
test_provider_affinity_forwarding.py
test_refuseless_provider.py feat(refuseless): add provider and model pricing (#48497) 2026-10-26 18:08:42 -07:00
test_reka_provider.py feat: generate provider_endpoints_support.json from the cost map (#48619) 2026-10-27 12:06:55 -07:00
test_scx_ai_provider.py feat(cost-map): add scx-ai DeepSeek-V4.1-flash, GLM-5.3 and Kimi-K3 (#46496) 2026-10-14 20:22:16 -07:00
test_streamlake_provider.py feat!: add StreamLake provider metadata (#41006) 2026-10-28 20:19:06 -07:00
test_tensormesh_provider.py
test_vispark_provider.py feat(litellm): add Vispark provider with Vision Small/Medium/Large (#41192) 2026-11-17 00:48:52 -08:00
test_wally_provider.py feat(providers): add Wally as an OpenAI-compatible provider (#45662) 2026-11-04 00:21:25 +00:00
test_xiaomi_mimo.py
test_zerogpu_provider.py feat(providers): add ZeroGPU as an OpenAI-compatible provider (#43874) 2026-10-28 12:40:32 -07:00