Fix AI SDK multi-turn warnings - #284
Merged
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #279
# Conflicts: # .gitkeep
konard
marked this pull request as ready for review
July 27, 2026 04:01
Contributor
Author
Working session summaryImplemented and finalized PR #284. Key changes:
Verification:
This summary was automatically extracted from the AI working session output. |
Contributor
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (150.2K + 4.9M cached) input tokens, 12.8K output tokens, $6.981880 cost 🤖 Models used:
📎 Log file uploaded as Gist (1944KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Contributor
Author
🎉 Auto-mergedThis pull request has been automatically merged by hive-mind.
Auto-merged by hive-mind with --auto-merge flag |
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.
Summary
Fixes #279.
systemoptionin normal generation, compaction, and title generation
@ai-sdk/openai-compatibleto the Language Model v3 adapter and pinAI SDK to the release that reports unsafe system-role placement
AI SDK's
console.warn/stderr warning pathReproduction and root cause
The regression performs two
streamTextturns against a local mockedOpenAI-compatible SSE response.
Before the adapter upgrade, it captured the compatibility warning twice:
With the v3 adapter but system-role entries still inside
messages, it capturedthe system-message warning twice:
The two root causes were therefore independent:
The fix uses AI SDK's dedicated
systeminput at every Agent generationboundary and updates the adapter to its AI SDK 6-compatible v3 implementation.
Warnings remain enabled globally, so future SDK warnings are still visible.
Verification
bun test ./tests/ai-sdk-warnings.ts— 1 passnpm test— 610 pass, 4 todo, 0 failnpm run check— ESLint, Prettier, and file-size checks passcargo test— all Rust unit, integration, and doc tests passgit diff --check— pass