feat(providers): add DigitalOcean and Scaleway presets - #872
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (16)
📝 WalkthroughWalkthroughThe PR adds DigitalOcean Serverless Inference and Scaleway Generative APIs as provider presets. It adds bounded, allowlisted model discovery, routing and parity tests, Scaleway directory metadata, and localized documentation. ChangesProvider integrations
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant ProviderRegistry
participant ModelsEndpoint
participant ChatEndpoint
Client->>ProviderRegistry: select provider preset
ProviderRegistry->>ModelsEndpoint: request authenticated model list
ModelsEndpoint-->>ProviderRegistry: return bounded model response
ProviderRegistry->>ProviderRegistry: apply provider allowlist
ProviderRegistry-->>Client: expose compatible models
Client->>ChatEndpoint: send fixed-endpoint chat request
Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 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: 2
🤖 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-site/src/content/docs/guides/providers.md`:
- Around line 269-273: Synchronize the Scaleway discovery sections in
docs-site/src/content/docs/guides/providers.md:269-273,
docs-site/src/content/docs/ja/guides/providers.md:192-195,
docs-site/src/content/docs/ko/guides/providers.md:191-194,
docs-site/src/content/docs/ru/guides/providers.md:202-206, and
docs-site/src/content/docs/zh-cn/guides/providers.md:180-183. In each locale,
identify the documented Chat Completions allowlist, authenticated-model
intersection, bounded discovery, and fail-closed exclusion of unknown,
Responses-only, embeddings, transcription, and other media models; additionally
update the Korean section to state that Project-qualified URLs and dedicated
deployments require a custom provider.
In `@src/providers/registry.ts`:
- Around line 586-598: Remove "gpt-oss-120b" from the
SCALEWAY_SERVERLESS_CHAT_MODELS catalog in src/providers/registry.ts. Update the
mixed-catalog discovery assertion in
tests/digitalocean-scaleway-provider.test.ts to verify that this model is
excluded while preserving the existing supported-model assertions.
🪄 Autofix (Beta)
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: 84fd0f19-db85-41cb-bed6-8e27ea1a55c0
📒 Files selected for processing (16)
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/free-directory.tssrc/providers/registry.tstests/digitalocean-scaleway-provider.test.tstests/fixtures/digitalocean-models.jsontests/fixtures/scaleway-models.jsontests/provider-registry-parity.test.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5f151216d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e5f1512 to
5afec20
Compare
5afec20 to
fc7222f
Compare
|
Author update — current head All review feedback received through this revision has been addressed:
Validation: This PR intentionally remains Draft until #870 lands. I will perform the final sequential restack and regenerate the 73 / 62 provider totals before marking it Ready. It relates to #572 and does not close the umbrella issue. |
fc7222f to
cecb6f4
Compare
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
|
✅ Deterministic PR hygiene checks passed. |
Maintainer rebase and merge preparation (2026-08-06)Rebased onto current Conflicts, and how each was resolvedThis rebase hit code conflicts, not just documentation, because #870 landed two entries at the same insertion point:
Totals regenerated from the executed registryAll 15 count sites were rewritten from that measurement: 74 = 62 key + 8 OAuth + 3 local + 1 forward. Worth recording why this is done by measurement rather than by arithmetic — The Verification on
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cecb6f4af3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| adapter: "openai-chat", | ||
| authKind: "key", | ||
| dashboardUrl: "https://cloud.digitalocean.com/model-studio/manage-keys", | ||
| liveModels: true, |
There was a problem hiding this comment.
Seed models for discovery outages
On a fresh DigitalOcean or Scaleway configuration, any transient /models failure (timeout, non-2xx response, malformed payload, or destination-policy rejection) leaves Codex with no routed models: both new entries enable liveModels but seed neither models nor a usable fallback, so failedDiscoveryFallback returns an empty configured catalog when no stale cache exists. Add a docs-backed defaultModel plus matching models seed for each provider and cover the fresh-cache failure path, as the Command Code preset does.
AGENTS.md reference: src/AGENTS.md:L17-L18
Useful? React with 👍 / 👎.
| "glm-5.2", | ||
| // gpt-oss-120b is intentionally omitted: Scaleway requires Responses API for tool calling, | ||
| // while this preset routes Codex agent tools through Chat Completions. | ||
| "qwen3.6-35b-a3b", |
There was a problem hiding this comment.
Populate context windows for generic catalog rows
When either authenticated discovery succeeds, these providers' generic /models rows supply no context metadata and the new registry entries provide no modelContextWindows, so ensureStrictCatalogFields advertises every admitted model as 128,000 tokens. This understates models such as qwen3.6-35b-a3b, which the repository's model metadata records at 262,144 tokens, causing Codex to compact conversations roughly halfway through the usable context. Add provider-verified context-window maps for the allowlisted IDs and assert the resulting catalog fields.
AGENTS.md reference: src/AGENTS.md:L18-L18
Useful? React with 👍 / 👎.
| "nemotron-3-ultra-550b", | ||
| "nvidia-nemotron-3-super-120b", | ||
| "nemotron-3-nano-omni", | ||
| "nemotron-nano-12b-v2-vl", |
There was a problem hiding this comment.
Advertise DigitalOcean vision-model inputs
When DigitalOcean discovery returns an admitted vision model such as nemotron-nano-12b-v2-vl, the generic row has no modality field and the DigitalOcean entry supplies no modelInputModalities, so catalog normalization publishes it as text-only and Codex blocks image attachments before the request reaches the proxy. The fresh evidence beyond the corrected Pixtral case is that the current tree's per-model NVIDIA audit already classifies the same underlying Nemotron model, along with Gemma 4, as image-capable, while this new DigitalOcean allowlist admits both without corresponding metadata. Add DigitalOcean-verified image modalities and cover the gathered catalog rows.
AGENTS.md reference: src/AGENTS.md:L18-L18
Useful? React with 👍 / 👎.
|
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. |
|
|
|
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. |
|
|
|
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. |
There was a problem hiding this comment.
💡 Codex Review
opencodex/src/providers/registry.ts
Lines 775 to 777 in cecb6f4
When authenticated Scaleway discovery returns another admitted multimodal chat model such as qwen3.6-35b-a3b, qwen3.5-397b-a17b, mistral-medium-3.5-128b, or mistral-small-3.2-24b-instruct-2506, the generic /models row still has no modality metadata and this map only corrects Pixtral. The fresh evidence beyond the Pixtral fix is that Scaleway's current supported-models table lists image formats for these same allowlisted IDs, so Codex will publish them as text-only and reject image attachments before they reach the proxy; add the per-model ['text', 'image'] entries here and cover one gathered catalog row.
opencodex/src/providers/registry.ts
Lines 1503 to 1505 in cecb6f4
When this preset is saved under a different provider name (for example do-prod pointing at the fixed DigitalOcean base URL), the destination-based discovery resolver still applies this allowlist, but the rest of the registry metadata is not applied because enrichment and routing look up metadata by provider name. The resulting live rows are advertised with the default Codex reasoning ladder and parallel-tool support, and requests can send reasoning_effort/parallel-tool fields that this same preset suppresses when named digitalocean; apply the same destination match to registry metadata or keep discovery tied to the named preset.
opencodex/src/providers/registry.ts
Line 732 in cecb6f4
When authenticated DigitalOcean discovery returns a documented Serverless text model that is not in this 26-id list, such as openai-gpt-5.2, openai-gpt-4.1, or alibaba-qwen3-32b, the filter drops it before it reaches Codex even though DigitalOcean's current model table lists those rows for Serverless Inference and the /v1/chat/completions schema tells callers to choose model IDs from /v1/models or the available-models page. That means fresh DigitalOcean setups hide valid chat models returned by their own key-scoped /models response; expand the docs-backed allowlist or derive it from the documented endpoint eligibility.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Roadmap unit for the four open provider-preset PRs under umbrella issue #572, produced by a docs-only PABCD cycle and hardened through five rounds of independent adversarial audit. - 000_plan.md: dependency-ordered work-phase map (#870 -> #872 -> #937, then #812), measured ground truth (dev registry = 70 presets: 58 key, 8 oauth, 3 local, 1 forward), the count-regeneration contract, and amendments A1-A8. - 010/020/030: diff-level rebase, verification, and merge docs per PR. - 040: the Apertis evidence gate and its resolved disposition. Findings that changed the plan: the OAuth narrative in all five locales states six-plus-Copilot while the registry has eight oauth rows including command-code (pre-existing defect, folded into WP1); the measured #870 rebase conflicts only in the ten locale docs while all code applies cleanly; deepinfra is destination-fallback-eligible with an absolute discovery URL, so the invariant is same-origin rather than same-URL; and #870's destination-fallback tests lack negative cases, which WP1 now builds rather than confirms. Refs #572, #870, #872, #937, #812.
Three PRs landed on dev: #870 (bbd82e7), #872 (e50f580), #937 (8ed03e7). The registry went 70 -> 76 presets, measured by executing the module. #812 (Apertis) is not merged and not closed. It meets four of the five canonical preset requirements and fails exactly the aggregator resale/routing authorization clause in MAINTAINERS.md. The prescribed free-directory fallback does not apply either, because that directory only admits free-access groups. Records what the process actually caught: the count contract stopped three real regressions (a stale OAuth number in the incoming diff, a pre-existing wrong OAuth narrative in five locales, and git rerere replaying a stale total), while a dropped documentation paragraph in WP3 was invisible to every automated gate and surfaced only from a grep.
Summary
Relates to #572. This PR intentionally does not close the umbrella issue.
Canonical preset evidence
https://inference.do-ai.run/v1, Bearer-authenticated/models, and the shared chat endpoint.https://api.scaleway.ai/v1, Bearer authentication, and the shared serverless API.Maintenance owner: @olddonkey. I am not affiliated with either provider.
Verification date: 2026-08-02.
Scope and safety
/modelsschemas expose only generic OpenAI-shaped rows, so discovery fails closed: a live row must also match the current first-party chat-model allowlist. Unknown rows are not promoted automatically.preserveCustomDestinationprevents registry promotion from retargeting keys already stored under a same-named custom provider. Discovery policy remains registry-only and is never serialized into user config or key-login metadata.Because this changes canonical credential destinations, explicit maintainer security review is requested.
Sequencing
This PR remains Draft until #870 lands. It is currently restacked onto
devand its standalone registry/docs totals are 71 presets / 60 key presets; after #870 merges, a final restack will regenerate those totals as 73 / 62.Verification
bun run typecheckbun test tests/digitalocean-scaleway-provider.test.ts tests/provider-model-discovery-contract.test.ts tests/provider-registry-parity.test.ts— 57 pass, 0 failbun run test— 7596 pass, 8 skip, 0 failbun run privacy:scancd docs-site && bun run build— 216 pagesgit diff --checkSummary 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.