feat(providers): add Chutes preset - #1315
Conversation
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe change adds Chutes as an API-key provider with bounded discovery of tool-capable models. It adds provider-specific tests and fixture data. Provider counts and Chutes usage details are documented in five locales. ChangesChutes Provider
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Client
participant ProviderRegistry
participant ChutesGateway
Client->>ProviderRegistry: load Chutes preset
ProviderRegistry->>ChutesGateway: fetch public /v1/models
ChutesGateway-->>ProviderRegistry: return model metadata
ProviderRegistry-->>Client: expose tool-capable models
Client->>ChutesGateway: send chat request with Bearer key
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@tests/chutes-provider.test.ts`:
- Around line 197-220: Extend the test "does not retarget an older same-named
custom provider or adapter" with a near-miss custom provider using adapter
"openai-chat" and baseUrl "https://llm.chutes.ai/v2", then assert
resolveProviderModelDiscovery("chutes", that provider).spec is undefined to
verify it is excluded from registry discovery.
- Around line 50-51: Remove the file-wide allowPrivateNetwork: true from the
Chutes provider configuration passed through providerConfig(). If fixture-only
discovery requires the bypass, apply it only in the specific fixture-fetch
helper or test and update the comment to explicitly identify it as a DNS
classification bypass.
In `@tests/fixtures/chutes-models.json`:
- Around line 28-49: Add a fixture row in chutes-models.json with
supported_features including tools while leaving context_length and
input_modalities null or omitted, so it passes the tool filter and exercises
metadata fallback handling. Update the expected model ID list in the relevant
chutes-provider test to include the new fixture, preserving existing
expectations.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 35ba7001-f728-410b-b76b-ad49124305fb
📒 Files selected for processing (14)
docs-site/src/content/docs/getting-started/quickstart.mddocs-site/src/content/docs/guides/providers.mddocs-site/src/content/docs/ja/getting-started/quickstart.mddocs-site/src/content/docs/ja/guides/providers.mddocs-site/src/content/docs/ko/getting-started/quickstart.mddocs-site/src/content/docs/ko/guides/providers.mddocs-site/src/content/docs/ru/getting-started/quickstart.mddocs-site/src/content/docs/ru/guides/providers.mddocs-site/src/content/docs/zh-cn/getting-started/quickstart.mddocs-site/src/content/docs/zh-cn/guides/providers.mdsrc/providers/registry.tstests/chutes-provider.test.tstests/fixtures/chutes-models.jsontests/provider-registry-parity.test.ts
Wibias
left a comment
There was a problem hiding this comment.
Maintainer + security review verdict: REQUEST CHANGES.
I reviewed the provider registry entry, discovery contract, request path, collision-preservation tests, fixture admission logic, docs, current CodeRabbit state, current dev, and the linked primary-source evidence.
Security/correctness findings: I did not find a credential leak, silent credential retarget, SSRF/path-injection route, unbounded catalog read, or unsafe trust inheritance in the Chutes implementation. preserveCustomDestination, exact transport matching, registry-only discovery policy, 256 KiB/128-row bounds, fail-closed tool filtering, and apiKeyValidation: "unknown" are the right shape. I also independently rechecked the current Chutes first-party docs: the shared https://llm.chutes.ai/v1 gateway, Bearer auth, and live GET /v1/models contract are now explicitly documented; the current ToS identifies Chutes Global Corp and covers API consumers/PAYGO automation. The preset is useful and directly serves #572.
Blocking changes:
- Rebase onto current
devand rerun CI. This head is now ~54devcommits behind. The existing green CI proves8f4201f5, not the current integration result; provider/catalog contracts have moved materially since this branch point. - Fix the standalone provider counts. Current
devdocuments 76 total / 64 key presets. This PR adds one provider, but changes every locale to 79 / 67. Merged by itself, that publishes a count two providers ahead of the registry. Update the counts to the actual post-rebase/post-merge state (or avoid batch-count churn until the three provider PRs are integrated sequentially).
All earlier CodeRabbit findings on this PR are resolved, and I found no additional production/security blocker beyond the two items above. Re-request review on the rebased exact head with fresh CI.
Rebase onto current dev and update docs from the batch 79/67 figures to the correct standalone 77/65 counts for this single-provider PR.
8f4201f to
09397db
Compare
|
Addressed on
CodeRabbit threads were already resolved on the prior head; no additional production/security issues found beyond the maintainer rebase/count items. |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. UI screenshot waived by the |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Tip For best results, initiate chat on the files or code changes.
You are interacting with an AI system. |
|
|
|
|
|
Merged — thank you @olddonkey for the careful Chutes preset work: bounded public-catalog discovery, conservative capability claims, collision preservation, fixture-only coverage, and synced docs all landed cleanly on |
Summary
chuteskey preset for Chutes' shared OpenAI-compatible LLM gateway athttps://llm.chutes.ai/v1.supported_featuresincludetools, preserve slash-containing model ids and safe live metadata, and bound the raw response to 256 KiB / 128 rows.Relates to #572. This PR intentionally does not close the umbrella issue.
Canonical preset evidence
Primary sources checked on 2026-08-08:
https://llm.chutes.ai/v1/chat/completionsgateway, Bearer key, and pay-per-token public inference./v1/modelsendpoint returned 13 rows (about 11 KiB); 11 explicitly advertisedtoolsinsupported_features. Tests use a checked-in representative fixture and never call this endpoint.Maintenance owner: @olddonkey. No affiliation with Chutes.
Security and scope
preserveCustomDestinationprevents an existing same-named custom provider/key from being silently retargeted to Chutes.config.jsonor the key-login map./v1/modelsis public,apiKeyValidationis explicitlyunknown; chat requests still send the configured Bearer key only to the matching fixed transport.Verification
bun test tests/chutes-provider.test.ts tests/provider-registry-parity.test.ts tests/provider-model-discovery-contract.test.ts— 67 pass, 0 failbun run typecheckbun run test— 10,061 pass, 7 skip, 0 fail across 628 filesbun run privacy:scancd docs-site && bun run build— 221 pagesgit diff --checkChecklist
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Documentation
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.