Skip to content

fix(core): resolve saved Workers AI account IDs - #48406

Draft
pkyanam wants to merge 1 commit into
anomalyco:v2from
pkyanam:workers-ai-config
Draft

fix(core): resolve saved Workers AI account IDs#48406
pkyanam wants to merge 1 commit into
anomalyco:v2from
pkyanam:workers-ai-config

Conversation

@pkyanam

@pkyanam pkyanam commented Sep 11, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #48404

Bug report: #48404

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Workers AI's catalog endpoint still contains ${CLOUDFLARE_ACCOUNT_ID} after /connect saves accountId, so the native resolver rejects it before sending a request. Substitute the saved account ID during OpenAI-compatible mapping and keep it out of provider request options.

Preserves explicit endpoints and environment-account precedence. Covers saved configuration, legacy metadata, provider settings, and canonical provider aliases.

How did you verify your code works?

  • Regression test reproduced the initialization error before the change.
  • Core resolver, native mapping, and Workers AI plugin tests: 74 passed.
  • Core retry/incomplete-stream/malformed-tool tests: 20 passed.
  • bun typecheck in packages/core passed.
  • Live patched resolver request to Workers AI DeepSeek Flash 0731 succeeded with the account ID supplied only through credential configuration and the environment variable unset.

Screenshots / recordings

Not applicable; no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@pkyanam

pkyanam commented Sep 11, 2026

Copy link
Copy Markdown
Author

The bug report is already open: #48404, created before this PR. The description includes Closes #48404 and now also the full issue URL.

This appears to be a false positive for the v2 target: the dev version of pr-standards.yml checks only closingIssuesReferences, whereas the v2 workflow already falls back to closing keywords in the PR body for non-default branches. Please keep this PR targeted at v2, as required by the current contribution guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant