Skip to content

V6 - #33

Merged
requesty-JohnCosta27 merged 3 commits into
mainfrom
v6
Dec 23, 2025
Merged

V6#33
requesty-JohnCosta27 merged 3 commits into
mainfrom
v6

Conversation

@requesty-JohnCosta27

@requesty-JohnCosta27 requesty-JohnCosta27 commented Dec 23, 2025

Copy link
Copy Markdown
Contributor

High-level PR Summary

This PR upgrades the provider implementation from @ai-sdk/provider v2 to v3, removing the completion model API entirely and modernizing the chat model to use the new V3 specification. The changes include a major refactor of finish reason handling, usage metrics structure (now with separated cache/no-cache/reasoning tokens), tool approval flow preparation, and updates to all language model interfaces from LanguageModelV2 to LanguageModelV3. The PR also bumps the peer dependency ai from ^5.0.52 to ^6.0.1 and updates related test assertions to match the new usage structure.

⏱️ Estimated Review Time: 1-3 hours

💡 Review Order Suggestion
Order File Path
1 package.json
2 pnpm-lock.yaml
3 src/index.ts
4 src/internal/index.ts
5 src/requesty-completion-language-model.ts
6 src/requesty-completion-settings.ts
7 src/map-requesty-finish-reason.ts
8 src/util/set-provider-metadata.ts
9 src/messages/handle-tool-message.ts
10 src/messages/handle-assistant-message.ts
11 src/messages/handle-system-message.ts
12 src/messages/index.ts
13 src/requesty-chat-language-model.ts
14 src/stream/index.ts
15 src/requesty-provider.ts
16 src/e2e/pizza.test.ts
17 src/integration/chat.test.ts
18 src/messages/handle-assistant-message.test.ts
19 src/messages/handle-tool-message.test.ts
20 src/stream/index.test.ts

Need help? Join our Discord

@recurseml recurseml Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by RecurseML

🔍 Review performed on 9a47cb3..e3847bf

  Severity     Location     Issue     Delete  
High src/requesty-chat-language-model.ts:286 Missing undefined fallback for outputTokens
High src/stream/index.ts:31 Incorrect cache token mapping
✅ Files analyzed, no issues (18)

package.json
pnpm-lock.yaml
src/e2e/pizza.test.ts
src/index.ts
src/integration/chat.test.ts
src/internal/index.ts
src/map-requesty-finish-reason.ts
src/messages/handle-assistant-message.test.ts
src/messages/handle-assistant-message.ts
src/messages/handle-system-message.ts
src/messages/handle-tool-message.test.ts
src/messages/handle-tool-message.ts
src/messages/index.ts
src/requesty-completion-language-model.ts
src/requesty-completion-settings.ts
src/requesty-provider.ts
src/stream/index.test.ts
src/util/set-provider-metadata.ts

Comment thread src/requesty-chat-language-model.ts Outdated
Comment thread src/stream/index.ts
@requesty-JohnCosta27
requesty-JohnCosta27 merged commit 6a4f8ce into main Dec 23, 2025
4 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