-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix: Add latest OpenAI models to ChatGPT Quick Actions #19485
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
Fix: Add latest OpenAI models to ChatGPT Quick Actions #19485
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Added support for latest OpenAI models (o1-preview, o1-mini, o3-mini) to ChatGPT Quick Actions extension, including model options and pricing calculations.
- Added new models to all command preferences and global preferences in
/extensions/chatgpt-quick-actions/package.json
- Implemented pricing calculations for new models in
/extensions/chatgpt-quick-actions/src/util.ts
- Added new changelog entry at the top of
/extensions/chatgpt-quick-actions/CHANGELOG.md
with correct{PR_MERGE_DATE}
format - Note: The PR only adds new models but doesn't remove obsolete ones as requested in issue [ChatGPT Quick Actions] add latest models #19481
- Recommend adding metadata folder with screenshots since this extension has view commands
💡 (5/5) You can turn off certain types of comments like style here!
3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
LGTM |
@drewbabel I'd suggest taking the newest models according to official OpenAI docs instead of what's requested in #19481. There is more capable 4.1 series and the reasoning models are now
In my view, let's get rid of them. There is not much point in keeping them as their support is being deprecated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drewbabel Could you consider working these in, please?
@one-data-cookie Thank you for the feedback! I've implemented all your requested changes, lmk if I've missed anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drewbabel Thanks for considering the feedback! ✅
// from : https://openai.com/api/pricing/ | ||
export function estimatePrice(input_token: number, output_token: number, model: string) { | ||
// Price is per 1M tokens in dollars, converted to cents | ||
// Updated pricing from: https://openai.com/api/pricing/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Updated pricing from: https://openai.com/api/pricing/ | |
// Pricing from: https://openai.com/api/pricing/ |
@drewbabel Just one more, very optional idea from when I adjusted this a few months ago. Potentially even for a new PR. I was trying to simplify it in a way the list of models (title & value) is defined only once and then simply gets used across the JSON. But to no avail, so I left it be. If you manage to make it work, I think it would make the maintenance of current models much, much easier. No worries if not, though, of course! |
@one-data-cookie suggestion to simplify maintenance
@one-data-cookie You're right - maintaining 9 duplicate model lists is painful. I've started working on a build script solution that defines models once and auto-generates the package.json. Will have it ready soon after this PR merges. |
c562071
to
8f77ae6
Compare
Making a new PR for this actually. Ignore this PR. Refer to #19592. |
Fixes #19481
This PR adds support for the latest OpenAI models to the ChatGPT Quick Actions extension:
Changes Made
I did NOT remove any obsolete models (even though it was requested by the user) - only added the new ones.