Repository navigation
Conversation
Greptile SummaryThis PR adds Vispark's provider enum and model registries, registers it for OpenAI-compatible chat and text-completion routing, and adds pricing, limits, modalities, and capability metadata for Vision Small, Medium, and Large.
Confidence Score: 4/5This PR is not ready to merge because the provider registration lacks the JSON configuration needed for default endpoint and credential resolution, and the repository-required provider tests are absent. Explicitly configured calls can use generic OpenAI-compatible routing, but Vispark is labeled and registered as a JSON-configured provider without the registry entry that supplies its defaults; the missing focused tests also violate the repository's new-feature testing requirement. Files Needing Attention: litellm/constants.py, litellm/init.py
|
| Filename | Overview |
|---|---|
| litellm/init.py | Adds Vispark's model set, cost-map population, global model list inclusion, and provider-to-model mapping, but without focused behavioral tests. |
| litellm/constants.py | Registers Vispark for OpenAI-compatible and text-completion routing while the required JSON provider configuration is absent. |
| litellm/types/utils.py | Adds the Vispark provider enum value consistently with the provider slug. |
| model_prices_and_context_window.json | Adds schema-valid pricing, limits, endpoints, modalities, and capabilities for three Vispark models. |
| litellm/model_prices_and_context_window_backup.json | Mirrors the three new Vispark model entries byte-for-byte from the primary model metadata file. |
Reviews (1): Last reviewed commit: "feat(litellm): add Vispark provider with..." | Re-trigger Greptile
| "ragflow", | ||
| "pinstripes", # Pinstripes - JSON-configured provider | ||
| "darkbloom", | ||
| "vispark", # Vispark Lab - JSON-configured provider |
There was a problem hiding this comment.
Missing JSON provider registration
This registers vispark as a JSON-configured OpenAI-compatible provider, but there is no corresponding entry in litellm/llms/openai_like/providers.json. The shared JSON provider path therefore cannot supply Vispark's default base URL or environment-backed credentials. Calls that rely on those provider defaults can target the wrong endpoint or fail authentication. This also violates the repository directive that new OpenAI-compatible integrations follow the established provider contribution pattern.
Rule Used: Block new LLM Provider integrations if they're openai compatible and don't follow https://docs.litellm.ai/docs/contributing/adding_openai_compatible_providers (source)
| elif value.get("litellm_provider") == "vispark": | ||
| vispark_models.add(key) |
There was a problem hiding this comment.
This new provider has no focused tests, contrary to the repository requirement that new provider features include meaningful behavioral coverage. Before merging, add tests for registry configuration, provider and model recognition, explicit overrides and default credential resolution, model-prefix stripping, and synchronized model metadata. Without this coverage, CI does not catch incomplete routing registration such as the missing JSON provider entry in this change.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
8a0355f to
b00ca54
Compare
|
Ready for review. Rebased onto latest
Verified: Note: history was rewritten by the rebase (old commits superseded). Requesting review — thank you! |
Adds Vispark Lab (https://lab.vispark.in) as an OpenAI-compatible provider with 3 chat models, following the existing JSON-configured provider pattern (cf. darkbloom/scx-ai).
model_prices_and_context_window.json(+ byte-identical backup):vispark/vision-small|medium|large— per-token USD costs ($1.05/3.16, $4.21/12.63, $7.37/22.11 per MTok), 1M input / 65K output, chat + completions endpoints, vision/audio/video/pdf + tools/structured-output flags, source linklitellm/__init__.py:vispark_modelsset + router registrationlitellm/types/utils.py:VISPARKprovider enumlitellm/constants.py:openai_compatible_providers+ text-completion listsUsage:
litellm.completion(model="vispark/vision-medium", api_base="https://api.lab.vispark.in/v1", api_key=...)Costs verified: cost_per_token returns the published figures exactly. cost_map_guard passes locally.