Skip to content

Conversation

ysfscream
Copy link
Member

PR Checklist

If you have any questions, you can refer to the Contributing Guide

What is the current behavior?

Issue Number

Example: None

What is the new behavior?

https://openai.com/index/gpt-4-1/

image

Does this PR introduce a breaking change?

  • Yes
  • No

Specific Instructions

Are there any specific instructions or things that should be known prior to review?

Other information

@ysfscream ysfscream added enhancement New feature or request feature This pr is a feature desktop MQTTX Desktop labels Apr 15, 2025
@ysfscream ysfscream added this to the v1.12.0 milestone Apr 15, 2025
@ysfscream ysfscream requested review from Red-Asuka and Copilot April 15, 2025 02:15
@ysfscream ysfscream self-assigned this Apr 15, 2025
@ysfscream ysfscream added this to MQTTX Apr 15, 2025
@ysfscream ysfscream moved this to In Progress in MQTTX Apr 15, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the dependency for @ai-sdk/openai to support new GPT-4.1 model variants.

  • Added new model options: 'gpt-4.1', 'gpt-4.1-mini', and 'gpt-4.1-nano'.
  • Enforced a type cast to LanguageModelV1 when obtaining the fallback provider.
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (2)

src/utils/ai/copilot.ts:105

  • [nitpick] Check that the naming convention for the new 'gpt-4.1' variants is intentional given the existing model names (e.g., 'gpt-4o' versus 'gpt-4.1'). If this is by design, consider adding a comment to clarify.
{ value: 'gpt-4.1' },

src/utils/ai/copilot.ts:227

  • Ensure that the explicit type cast to LanguageModelV1 remains valid for the updated API. If the provider function now returns a different type for GPT-4.1 models, update the type accordingly.
return fallbackProvider(model) as LanguageModelV1

@Red-Asuka Red-Asuka merged commit 297aa7b into main Apr 15, 2025
4 checks passed
@Red-Asuka Red-Asuka deleted the ysf/desktop branch April 15, 2025 02:31
@github-project-automation github-project-automation bot moved this from In Progress to Done in MQTTX Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop MQTTX Desktop enhancement New feature or request feature This pr is a feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants