feat(providers): add Chutes preset - #1315
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 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🧪 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.
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 --checkNo GUI source changed, so there is no screenshot.
Checklist
Summary by CodeRabbit
New Features
Documentation