Repository navigation
feat: add StreamLake provider metadata - #41006
ZHOUKAILIAN wants to merge 2 commits into
Conversation
|
|
|
| } | ||
|
|
||
|
|
||
| class TestStreamlakeProviderConfig: |
There was a problem hiding this comment.
These tests inspect registration and metadata without running a mocked chat completion. The repository requires behavioral tests before merging
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! |
8ca411c to
2b17f1e
Compare
|
@greptileai Please re-review 2b17f1e: added mocked completion coverage, fixed endpoint discovery and dashboard registration, and rebased onto main. |
TLDR
Problem this solves:
How it solves it:
This replaces #40354 at its author's request. The branch is rebased onto current
mainatbfc805b37279. The earlier dashboard schema sync commit was dropped because its change is already upstream. This does not include #40355User Flow
Before: a developer cannot use StreamLake by provider name
streamlake/<model-or-endpoint>with their StreamLake API keyAfter: the same developer can use StreamLake by provider name
streamlake/<model-or-endpoint>with their StreamLake API keyProvider discovery lists StreamLake under Chat Completions. Dashboard users can select StreamLake and a public model, enter their API key, and submit a deployment
These are the intended live flows. Tests cover request routing, endpoint discovery, and the dashboard submission payload, but live provider verification remains outstanding
Relevant issues
Replacement for #40354, which remains open for review history
The old
proxy-behaviorfailure is the upstream auth-prefetch cache TTL flake fixed by #40996, now included through the rebaseAffected release
Linear ticket
Pre-Submission checklist
Local verification
At
2b17f1e, withPYTHON_DOTENV_DISABLED=1andLITELLM_LOCAL_MODEL_COST_MAP=True:Result: 296 passed, 5 skipped. The skips require PublicAI or Xiaomi credentials, not StreamLake credentials. All 50 StreamLake provider cases pass, including six HTTP-level completion cases: sync/async with the default base, a custom base, and a custom base ending in
/The completion tests call the public LiteLLM functions and the real OpenAI SDK, with only HTTP intercepted by respx. They assert the URL, method, authorization header, complete request body, model-prefix removal, token-parameter mapping, and parsed response content and usage
Mutation check: removing StreamLake from the bundled endpoint support file makes the new
/public/endpointsregression fail. Restoring the entry makes it passResult: 86 passed. The integration test selects StreamLake and a public model through the real form components, enters an API key, and checks the exact model-creation payload
The dashboard production build passed. Targeted ESLint passed with 0 errors and 11 existing warnings. Targeted Ruff checks, changed production Python/StreamLake-test formatting, test-quality and type-discipline gates against
upstream/main, andgit diff --checkpassed. No lint budgets were changedBoth cost maps preserve all upstream records and add the same 15 StreamLake records; the two files remain byte-identical. Both endpoint matrices preserve their existing entries and add the same StreamLake stanza
The checkout is sparse and uses locked Python dependencies without building the Rust extension.
make lint BASE_REF=upstream/maincould not complete its environment setup because the Rust build sources were not checked out. The Python-path tests and targeted gates above passed; full lint, native builds, coverage, and new-tip bot reviews remain for CIScreenshots / Proof of Fix
Before (bfc805b)
After (2b17f1e)
Type
New Feature
Bug Fix
Test
Caveats (if any)
Medium
Low
Final Attestation