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

Token Limit for gpt-4o-mini Model in v1/chat/completions API #319

Open
kerlw opened this issue Sep 3, 2024 · 1 comment
Open

Token Limit for gpt-4o-mini Model in v1/chat/completions API #319

kerlw opened this issue Sep 3, 2024 · 1 comment

Comments

@kerlw
Copy link

kerlw commented Sep 3, 2024

I have been testing the gpt-4o-mini model using the v1/chat/completions API and have encountered an issue regarding the token limit. According to the official documentation, the context window for the gpt-4o-mini model is specified as 128,000 tokens. However, in my tests, the total token length limit seems to be restricted to approximately 16,000 tokens instead.

Here are the details of my test:

Model: gpt-4o-mini
Test Scenario: I included a history conversation of around 16,000 tokens and set max_tokens to 4,000.
Issue: The response was truncated, and I only received a few hundred tokens of output. model in response is gpt-4o-mini-2024-07-18. The stop_reason: length in the response indicates that the length limit was exceeded, despite the remaining difference between 16,000 tokens and the documented 128,000 tokens being substantial.
I would appreciate it if you could investigate this discrepancy and confirm whether there are any additional limitations or if this might be an issue with the API. Your assistance in clarifying this matter would be greatly valued.

Thank you.

@kerlw
Copy link
Author

kerlw commented Sep 3, 2024

Current tier
Usage tier 3

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

No branches or pull requests

1 participant