feat(sglang): add SGLang provider - #664
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds SGLang as a supported provider with OpenAI-compatible APIs, native passthrough routing, optional bearer authentication, environment discovery, Helm configuration, documentation, dashboard linking, and test coverage. ChangesSGLang provider implementation
Runtime integration
Deployment configuration
Documentation and dashboard discovery
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CLAUDE.md`:
- Around line 139-141: Update the provider documentation in the “Provider API
key rotation” section to remove SGLang and vLLM from the keyless/unaffected
provider list. Preserve wording that they support optional API-key
authentication, rotation slots, session affinity, and dashboard api_keys
configuration; leave Ollama and non-API-key providers unchanged.
In `@docs/features/passthrough-api.mdx`:
- Around line 134-135: Update the passthrough provider defaults documented in
CLAUDE.md to match the runtime configuration: include openai, anthropic,
openrouter, kilo, zai, sglang, vllm, and deepseek, preserving the existing
formatting and wording.
In `@internal/providers/config_test.go`:
- Around line 946-971: Update the SGLang discovery tests around
TestApplyProviderEnvVarsDiscoversSGLangWithoutAPIKey and
TestApplyProviderEnvVarsDiscoversSGLangFromAPIKeyWithDefaultBaseURL to clear
provider environment variables before each case, preventing ambient
SGLANG_BASE_URL or SGLANG_API_KEY values from affecting results. Consolidate
both scenarios into a table-driven test while preserving their distinct
environment setup and assertions.
In `@run/providers_test.go`:
- Around line 49-54: Update TestDefaultProviderFactoryCredentialForms to compare
the complete set of required fields from the provider schema against each test
case’s required value, including the sglang row’s required: nil expectation. Do
not limit validation to fields listed in tt.required; ensure schema-required
fields such as base_url cause the test to fail when the expected credential form
is keyless.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 5ab426ef-15e4-4665-add5-32a12aa406de
⛔ Files ignored due to path filters (2)
internal/admin/dashboard/static/dist/assets/index-CiIXCM_n.jsis excluded by!**/dist/**internal/admin/dashboard/static/dist/index.htmlis excluded by!**/dist/**
📒 Files selected for processing (28)
CLAUDE.mdREADME.mdconfig/config.example.yamlconfig/config.goconfig/config_test.goconfig/server.godocs/advanced/config-yaml.mdxdocs/advanced/configuration.mdxdocs/docs.jsondocs/features/passthrough-api.mdxdocs/guides/production.mdxdocs/providers/overview.mdxdocs/providers/sglang.mdxhelm/README.mdhelm/values.schema.jsonhelm/values.yamlinternal/providers/config_test.gointernal/providers/sglang/passthrough_semantics.gointernal/providers/sglang/sglang.gointernal/providers/sglang/sglang_test.gointernal/server/handlers_test.gointernal/server/passthrough_support.gointernal/usage/cost.gointernal/usage/cost_test.gorun/providers.gorun/providers_test.goweb/dashboard/src/pages/overview/providersLogic.jsweb/dashboard/tests/overview-providers.test.js
Confidence Score: 4/5Not merge-safe: two documented SGLang passthrough routes target incorrect upstream paths. There is one independent, verified P1 non-security finding, which maps to a confidence score of 4. Files Needing Attention:
What T-Rex did
Reviews (1): Last reviewed commit: "feat(sglang): add SGLang provider" | Re-trigger Greptile |
Description
Testing
AI Generated (optional)
Implementation and tests were produced with Codex and reviewed and verified locally.
Summary by CodeRabbit
New Features
Documentation