Skip to content
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

[OPIK-744] fix providers' models list #1041

Merged
merged 11 commits into from
Jan 20, 2025

Conversation

idoberko2
Copy link
Contributor

Details

This PR extends supported OpenAI models list to match their documentation. During the work on that I noticed langchain4j's Anthropic models list is missing all the *-latest flavors so I took care of that as well.
@aadereiko FYI

Issues

OPIK-744

Testing

Based on existing tests.

Note

@andrescrz, during the work on that I noticed OpenAi's model named o1. I think we should reconsider provider resolution based on the model name since I guess at some point we will discover a name collision.

@idoberko2 idoberko2 self-assigned this Jan 14, 2025
@idoberko2 idoberko2 requested a review from a team as a code owner January 14, 2025 12:27
Comment on lines +8 to +9
@RequiredArgsConstructor
public enum OpenaiModelName {
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a similar list in ModelPrice. Can we try to unify both lists?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch! I completely forgot about this one. Updated.
@BorisTkachenko, I noticed a few openai models missing in ModelPrice and added them. Your review will be appreciated. In addition, can we consider renaming ModelPrice to be openai specific? Something like OpenaiModelPrice?

Copy link
Contributor

Choose a reason for hiding this comment

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

@idoberko2 Feel free to rename, seems ok to me. Regarding new models they sometimes add them, so list should be updated. However I'm not sure about those two: gpt-4-0613, gpt-4-turbo-preview.
It looks like they are not listed under OpenAI prices, so I guess we do not need them:
https://openai.com/api/pricing/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are used as aliases and therefore can be used by users, see here: https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4

@idoberko2 idoberko2 requested a review from thiagohora January 15, 2025 07:32
@idoberko2 idoberko2 force-pushed the ido/opik-744-fix-openai-models-list branch from ccf0c4a to fd36b12 Compare January 15, 2025 07:36
BorisTkachenko
BorisTkachenko previously approved these changes Jan 15, 2025
Copy link
Contributor

@BorisTkachenko BorisTkachenko left a comment

Choose a reason for hiding this comment

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

Looks good from my side

thiagohora
thiagohora previously approved these changes Jan 15, 2025
Copy link
Contributor

@thiagohora thiagohora left a comment

Choose a reason for hiding this comment

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

It is not a blocker, but I would move from the enum from cost to llmproviders package and rename it to OpenaiModel only.

@andrescrz
Copy link
Collaborator

@andrescrz, during the work on that I noticed OpenAi's model named o1. I think we should reconsider provider resolution based on the model name since I guess at some point we will discover a name collision.

@idoberko2 yeah, I agree. I was never a big fan of that requirement. It was a good way to start, but I encourage you to open a backlog ticket and make a proposal in there for a better solution. Or at least just create the ticket and document the potential problem you described.

Copy link
Collaborator

@andrescrz andrescrz left a comment

Choose a reason for hiding this comment

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

Let's think for a second if we want to couple the model pricing enumeration with the LLM proxy enumeration.

It doesn't seem like a good idea, see my comments.

Additionally, we don't support pricing yet for Anthropic and Gemini, so that inconsistency in the enums used is another indicator of this problem.

@andrescrz andrescrz merged commit 27e241a into main Jan 20, 2025
8 checks passed
@andrescrz andrescrz deleted the ido/opik-744-fix-openai-models-list branch January 20, 2025 08:53
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.

4 participants