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

fix(openai): support all o series models #1031

Merged
merged 1 commit into from
Jan 5, 2025
Merged

Conversation

larrylv
Copy link
Contributor

@larrylv larrylv commented Jan 3, 2025

Before this change, since max_completion_tokens was not set for o series models, the completion request sometimes times out. This PR makes sure that it converts the max_tokens parameter to max_completion_tokens for o series models.

I tested this change with gpt-4o-mini, o1-mini and o3-mini, and they all still work as expected.

Before this change, since `max_completion_tokens` was not set for `o` series models, the completion request will time out sometimes. This makes sure it converts the `max_tokens` parameter to `max_completion_tokens` for `o` series models.

I tested this change with `gpt-4o-mini`, `o1-mini` and `o3-mini`, and they all still work as expected.
@yetone yetone merged commit ec5d1ab into yetone:main Jan 5, 2025
brewinski pushed a commit to brewinski/avante.nvim that referenced this pull request Jan 10, 2025
Before this change, since `max_completion_tokens` was not set for `o` series models, the completion request will time out sometimes. This makes sure it converts the `max_tokens` parameter to `max_completion_tokens` for `o` series models.

I tested this change with `gpt-4o-mini`, `o1-mini` and `o3-mini`, and they all still work as expected.
brewinski pushed a commit to brewinski/avante.nvim that referenced this pull request Jan 10, 2025
Before this change, since `max_completion_tokens` was not set for `o` series models, the completion request will time out sometimes. This makes sure it converts the `max_tokens` parameter to `max_completion_tokens` for `o` series models.

I tested this change with `gpt-4o-mini`, `o1-mini` and `o3-mini`, and they all still work as expected.
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