Skip to content

fix(providers): use account-scoped Cloudflare credential probes - #18447

Merged
diegosouzapw merged 3 commits into
cheaper-inference:release/v3.8.53from
chernistry:fix/upstream-cf-health-20261028
Nov 4, 2026
Merged

diegosouzapw merged 3 commits into
cheaper-inference:release/v3.8.53from
chernistry:fix/upstream-cf-health-20261028

Conversation

@chernistry

Copy link
Copy Markdown
Contributor

Cloudflare Workers AI connection checks currently probe /client/v4/accounts/models, which omits the account ID. Use the documented account-scoped GET /ai/models/search?per_page=1 instead, sharing account selection and authentication headers with the executor. Explicit Global API Key configuration sends X-Auth-Email and X-Auth-Key; API tokens keep Bearer authentication.

Only a recognized successful metadata envelope validates the check. Unrecognized HTTP 200 responses and ambiguous 403/429 responses remain neutral, preserving stored credential health. Recognized authentication rejection remains invalid. The check does not run inference or establish inference permissions or available quota.

Validation:

  • 23 focused tests pass across the new tests/unit/cloudflare-ai-connection-probe.test.ts, existing Cloudflare executor/image/tool-call tests, and stored-health neutral validation tests. The two initial regression assertions failed before the fix.
  • Full ESLint passes with --pass-on-unpruned-suppressions; the default command stops on stale suppression entries. No suppression baseline changed.
  • Provider assets and provider consistency pass (the latter via the identical TypeScript script under Node because the installed Bun placeholder cannot start). Normal commit hooks pass.
  • Inherited checks remain: translate-path golden differs in six GitHub/GHE User-Agent fields, reproduced with the original base files; TLA ordering flags three untouched tests. No snapshots or unrelated tests changed. Broad suites/build/coverage ratchet remain for CI.

⚠️ base-red inherited: #17219. Prepared on immutable ffe4b5217882312acba741cbe403494fc0f7ef7d for release/v3.8.53; recheck the target and release policy before publication.

Reference: https://developers.cloudflare.com/api/resources/ai/subresources/models/methods/list/

Signed-off-by: chernistry <73943355+chernistry@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@diegosouzapw
diegosouzapw merged commit de0d45b into cheaper-inference:release/v3.8.53 Nov 4, 2026
3 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants