Skip to content

feat: add StreamLake provider metadata - #40354

Open
ZHOUKAILIAN wants to merge 4 commits into
BerriAI:mainfrom
ZHOUKAILIAN:litellm_streamlake_provider_metadata
Open

ZHOUKAILIAN wants to merge 4 commits into
BerriAI:mainfrom
ZHOUKAILIAN:litellm_streamlake_provider_metadata

Conversation

@ZHOUKAILIAN

Copy link
Copy Markdown

TLDR

Problem this solves:

  • StreamLake is not a registered provider
  • StreamLake model pricing is missing

How it solves it:

  • Adds StreamLake as an OpenAI-compatible provider
  • Adds public StreamLake model metadata
  • Adds focused provider and pricing tests

User Flow

Before: a developer cannot configure StreamLake by provider name

  1. They configure a chat completion model as
    streamlake/<model-or-endpoint>
  2. They send POST https://litellm-domain/v1/chat/completions
  3. LiteLLM cannot resolve StreamLake as a registered provider

After: the same developer can configure StreamLake by provider name

  1. They configure a chat completion model as
    streamlake/<model-or-endpoint>
  2. They send POST https://litellm-domain/v1/chat/completions
  3. LiteLLM resolves StreamLake and sends the request to the StreamLake chat
    completions URL

Relevant issues

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a
    laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync
    check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific
    problem
  • I have received a Greptile Confidence Score of at least 4/5 before
    requesting a maintainer review

Screenshots / Proof of Fix

After 3c1331f

  1. uv run pytest tests/test_litellm/llms/openai_like/test_streamlake_provider.py -q
  2. Observed output: 44 passed in 1.35s
  3. uv run ruff check tests/test_litellm/llms/openai_like/test_streamlake_provider.py litellm/constants.py litellm/types/utils.py litellm/utils.py
  4. Observed output: All checks passed!

Type

New Feature
Test

Caveats (if any)

Low

  • Live StreamLake API proof still needs provider credentials

Final Attestation

  • The tests check the right things, including the edge cases, and
    regressions in the respective real-world customer use-cases are not possible
    after this PR

@ZHOUKAILIAN
ZHOUKAILIAN requested a review from a team September 9, 2026 02:58
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codspeed

codspeed Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing ZHOUKAILIAN:litellm_streamlake_provider_metadata (c9591d0) with litellm_internal_staging (47b15ff)

Open in CodSpeed

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds StreamLake as a declaratively configured OpenAI-compatible chat provider and publishes its model pricing, limits, and capability metadata

  • Registers StreamLake for provider-prefix and API-base resolution
  • Configures credentials, URL construction, and token-parameter mapping
  • Adds public model pricing and capability records to both catalogs
  • Exposes additional input and output modality metadata through get_model_info
  • Adds focused tests for provider resolution, configuration, metadata, and cost calculation

Confidence Score: 5/5

The PR appears safe to merge, with provider registration, dispatch metadata, model information, and focused tests aligned

No actionable failure remains; StreamLake resolves through the shared JSON-provider path, its model metadata follows catalog semantics, and both pricing catalogs stay synchronized

Important Files Changed

Filename Overview
litellm/llms/openai_like/providers.json Adds the declarative StreamLake chat provider configuration, credential environment variables, base URL, and token mapping
litellm/constants.py Registers StreamLake among known OpenAI-compatible endpoints and providers
litellm/types/utils.py Adds the StreamLake provider enum member and read-only modality fields to public model metadata types
litellm/utils.py Propagates image, video, and modality metadata from the model catalog through public model information
model_prices_and_context_window.json Adds StreamLake model pricing, token limits, rate limits, and capability metadata
litellm/model_prices_and_context_window_backup.json Keeps the bundled backup model catalog synchronized with the root catalog
provider_endpoints_support.json Publishes StreamLake as supporting chat completions only
tests/test_litellm/llms/openai_like/test_streamlake_provider.py Tests provider registration, resolution, URL construction, parameter mapping, catalog synchronization, capabilities, and pricing

Reviews (1): Last reviewed commit: "feat: add StreamLake provider metadata" | Re-trigger Greptile

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ZHOUKAILIAN
ZHOUKAILIAN force-pushed the litellm_streamlake_provider_metadata branch from 3c1331f to f557901 Compare September 9, 2026 03:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants