feat(llmd): add dedicated llm-d provider - #665
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Warning Review limit reached
Next review available in: 20 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (24)
📝 WalkthroughWalkthroughThis change adds an llm-d provider with configurable routing controls, passthrough APIs, Helm support, registration, tests, dashboard linking, and documentation. It also updates the OpenCode Go configuration reference. Changesllm-d provider
OpenCode Go documentation
Estimated code review effort: 4 (Complex) | ~60 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: 5
🤖 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 `@docs/providers/llmd.mdx`:
- Around line 30-33: Update the optional controls section in the LLMD provider
documentation to state the default behavior of LLMD_INFERENCE_OBJECTIVE when
omitted, including whether GoModel omits the objective header or injects a
default value, and explain when users should override it.
- Around line 85-93: Update the curl fairness example to authenticate with a
managed key or extension identity that binds the user path /team/alpha, rather
than relying only on the raw X-GoModel-User-Path header. Keep the request
minimal while ensuring it exercises the documented fairness-ID behavior.
In `@internal/providers/config_test.go`:
- Around line 529-551: Convert TestApplyProviderEnvVars_LLMDControls into a
table-driven test covering both primary and suffixed LLMD providers. Set
LLMD_CANARY_FAIRNESS_FROM_USER_PATH, then assert each case’s provider name and
expected FairnessFromUserPath value, while preserving the existing
inference-objective and canary BaseURL assertions.
In `@internal/providers/llmd/llmd_test.go`:
- Around line 29-64: Update TestChatCompletionInjectsTrustedLLMDHeaders to use a
table-driven structure covering the relevant control-header and
provider-specific parameter-mapping cases. Capture the ChatCompletion response
and assert normalized ID, model, and assistant choice fields, while retaining
header assertions for each case; ensure the cases also verify response
normalization rather than only checking the error.
In `@internal/providers/llmd/llmd.go`:
- Around line 210-224: Update cloneWithoutControlHeaders to remove Authorization
and all client API-key or other credential-bearing headers while preserving
non-credential passthrough headers. Ensure both passthrough paths sanitize
headers before calling llmclient.DoPassthrough, retaining only the
gateway-generated authentication header, and add coverage verifying client
Authorization and API-key headers never reach the upstream server.
🪄 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: 40ba7a20-1704-44a8-93f9-8faebaa729ad
⛔ Files ignored due to path filters (2)
internal/admin/dashboard/static/dist/assets/index-DsX4Ww0Q.jsis excluded by!**/dist/**internal/admin/dashboard/static/dist/index.htmlis excluded by!**/dist/**
📒 Files selected for processing (30)
.env.templateCLAUDE.mdREADME.mdconfig/config.example.yamlconfig/config.goconfig/config_test.goconfig/providers.goconfig/server.godocs/advanced/config-yaml.mdxdocs/advanced/configuration.mdxdocs/docs.jsondocs/features/passthrough-api.mdxdocs/providers/llmd.mdxdocs/providers/overview.mdxhelm/README.mdhelm/templates/_helpers.tplhelm/values.schema.jsonhelm/values.yamlinternal/providers/config.gointernal/providers/config_test.gointernal/providers/llmd/llmd.gointernal/providers/llmd/llmd_test.gointernal/providers/llmd/passthrough_semantics.gointernal/server/handlers_test.gointernal/server/passthrough_support.gointernal/usage/cost_test.gorun/providers.gorun/providers_test.goweb/dashboard/src/pages/overview/providersLogic.jsweb/dashboard/tests/overview-providers.test.js
Confidence Score: 5/5No blocking failure remains. No accepted blocking findings remain after exercising llm-d passthrough control-header handling and authenticated user-path fairness behavior.
What T-Rex did
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
|
@greptile-apps Addressed the passthrough rejection-metadata finding in 6c47318. Normalized llmd 429 responses now preserve only |
# Conflicts: # .env.template # CLAUDE.md # README.md # config/config.example.yaml # config/config_test.go # config/server.go # docs/advanced/config-yaml.mdx # docs/advanced/configuration.mdx # docs/features/passthrough-api.mdx # docs/providers/overview.mdx # helm/README.md # helm/values.schema.json # helm/values.yaml # internal/admin/dashboard/static/dist/assets/index-CiIXCM_n.js # internal/admin/dashboard/static/dist/assets/index-DbvfJbHk.js # internal/admin/dashboard/static/dist/assets/index-DsX4Ww0Q.js # internal/admin/dashboard/static/dist/index.html # internal/providers/config_test.go # internal/server/handlers_test.go # internal/server/passthrough_support.go # internal/usage/cost_test.go # run/providers_test.go # web/dashboard/tests/overview-providers.test.js
Summary
llmdprovider for llm-d Router/EPP OpenAI-compatible inferenceTesting
go test ./...golangci-lint run ./internal/providers/llmd/... ./internal/providers/... ./config/... ./internal/server/... ./run/...npm test(476 tests) andnpm run checkinweb/dashboardproviders.existingSecretqwen2.5:0.5bNotes
The local model smoke test exercised the provider through an OpenAI-compatible Ollama endpoint. llm-d-specific request headers, trust-boundary behavior, routing, shared key rotation, and dropped-reason propagation are covered by HTTP integration tests.
Summary by CodeRabbit
New Features
Documentation