fix(provider): normalize cloudflare-workers-ai mixed message content#30589
Open
ulises-jeremias wants to merge 6 commits into
Open
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Contributor
Author
|
Updated the PR description to match the required template sections (Issue, Type of change, What this PR does, verification, and checklist) Re-verified locally from packages/opencode:
|
…nt-shape * upstream/dev: (715 commits) chore: update nix node_modules hashes feat(oauth): unify OAuth callback browser pages (anomalyco#34025) chore: generate refactor(app): replace tab drag handling with dndkit (anomalyco#33880) refactor(app): use dropdown for project selector (anomalyco#33984) chore: update nix node_modules hashes fix(app): bump ghostty-web to prevent terminal resize hangs (anomalyco#34020) chore: generate feat(sdk): expose active sessions (anomalyco#33991) fix(sdk): wake embedded session execution (anomalyco#33992) refactor(opencode): stop legacy v2 event emission (anomalyco#33993) fix(ui): normalize tooltip trigger layout (anomalyco#33979) fix(app): suspend hidden terminal renderer (anomalyco#33990) fix(app): enable auto-accept in session settings (anomalyco#33974) tweak: hide MCP access token prefix (anomalyco#33711) fix(core): refine small model defaults (anomalyco#33926) feat(core): split MCP timeout configuration (anomalyco#33977) fix(app): simplify question prompt (anomalyco#33968) feat(llm): pass strict through tool definitions for Codex parity (anomalyco#33392) chore: generate ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #30381
Type of change
What does this PR do?
Cloudflare Workers AI can reject requests when message content mixes string content with array content. This PR normalizes mixed payloads into a consistent string form only when it is safe:
string+arraymessage content forcloudflare-workers-aiHow did you verify your code works?
bun test test/provider/transform.test.ts(frompackages/opencode)bun typecheck(frompackages/opencode)Screenshots / recordings
N/A (no UI changes)
Checklist