Skip to content

Fix: Add latest OpenAI models and consolidation system #19592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

drewbabel
Copy link
Contributor

@drewbabel drewbabel commented Jun 3, 2025

Fixes #19481 --> references PR #19485

This PR updates the ChatGPT Quick Actions extension with the latest OpenAI models and adds a consolidation system for easier maintenance.

Changes Made

Added Latest Models

  • GPT-4.1 series: GPT-4.1, GPT-4.1 mini, GPT-4.1 nano
  • Reasoning models: o1, o1-mini, o1-pro, o3, o3-mini, o4-mini

Removed Obsolete Models

  • GPT-3.5 Turbo (deprecated)
  • GPT-4 (superseded)
  • GPT-4 Turbo (superseded)

Updated Pricing Structure

  • Changed from per 10K tokens to per 1M tokens
  • Updated with current OpenAI pricing rates
  • Changed parameter names from prompt_token/output_token to input_token/output_token

Added Consolidation System

  • Models now defined in single location (scripts/models.js) instead of 9 places
  • Added npm run build-package script to auto-generate package.json
  • Simplified future model updates to 1-step process

Related to previous PR #19485 - incorporates all reviewer feedback from @one-data-cookie.

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: chatgpt-quick-actions Issues related to the chatgpt-quick-actions extension labels Jun 3, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented Jun 3, 2025

Thank you for your contribution! 🎉

🔔 @alanzchen @one-data-cookie @JonathanAquino you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

You can expect an initial review within five business days.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Updates OpenAI model support in ChatGPT Quick Actions extension with a significant refactor of model management, but includes several critical issues that need addressing.

  • scripts/models.js includes non-existent models (GPT-4.1, GPT-4.1-mini, GPT-4.1-nano) - these should be removed as they don't exist in OpenAI's lineup
  • CHANGELOG.md contains duplicate entries with {PR_MERGE_DATE} template - these should be consolidated into a single entry
  • Some models listed as "Latest" (o1, o3) are actually preview/limited access models - this should be clearly documented
  • Package template system is well-structured but pricing calculations in util.ts need validation against official OpenAI rates
  • Model consolidation system is a good architectural improvement but needs additional error handling in build-package.js

7 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings | Greptile

@drewbabel drewbabel force-pushed the fix/issue-19481-add-latest-models branch from b5eadee to bfc474c Compare June 3, 2025 22:04
@drewbabel drewbabel force-pushed the fix/issue-19481-add-latest-models branch from bfc474c to 3e2dcdb Compare June 3, 2025 22:07
Copy link
Contributor

@one-data-cookie one-data-cookie left a comment

Choose a reason for hiding this comment

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

@drewbabel Very neat, thanks for taking the time to consolidate it! 🚀

@@ -1,5 +1,15 @@
# ChatGPT Quick Actions Changelog

## [Models Update and Consolidation] - {PR_MERGE_DATE}

- Added latest OpenAI models: GPT-4.1, GPT-4.1 mini, GPT-4.1 nano, o1, o1-mini, o1-pro, o3, o3-mini, o4-mini
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a useless nitpick – I'd use imperative mood instead of past tense in these, same as in commit messages and below.

"platforms": [
"macOS"
]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing an empty row at the end. Same in the other files below.

Suggested change
}
}

## Adding New Models

1. Edit `scripts/models.js`
2. Update pricing in `src/util.ts`
Copy link
Contributor

Choose a reason for hiding this comment

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

Or similar.

Suggested change
2. Update pricing in `src/util.ts`
2. Update [pricing](https://openai.com/api/pricing/) in `src/util.ts`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension: chatgpt-quick-actions Issues related to the chatgpt-quick-actions extension extension fix / improvement Label for PRs with extension's fix improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ChatGPT Quick Actions] add latest models
3 participants