-
Notifications
You must be signed in to change notification settings - Fork 255
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
[Bug] Remove compulsory include_usage
when stream=true
in gateway
#757
[Bug] Remove compulsory include_usage
when stream=true
in gateway
#757
Conversation
/assign @varungup90 |
Signed-off-by: Thien Tran <[email protected]>
8413b57
to
4db03cb
Compare
If the user has enabled rpm/tpm validation then we need to have include usage. To make include_usage optional will need check on whether user has enabled rpm/tpm limit check. |
For futures relies on usage statistics, can we add in the documentation to ask them enable it explicitly? heterogenous feature need it as well. By default, it should be clean |
@varungup90 @Jeffwan Let me know how you want me to add the checks and how to test them. I'm eager to contribute, but if it's too complicated, I can close this PR and you can open your own. Another question. When |
@varungup90 could you give more suggestions on the tpm check? Let's get @gau-nernst onboard. |
|
I think the biggest issue is that it's not 100% OpenAI-compatible. Client code that does not expect From OpenAI doc https://platform.openai.com/docs/api-reference/chat/create
Perhaps another option is to always send |
I have started a PR to make include_usage as optional param by default. If user's TPM limit is configured then include_usage is required. Heterogenous use case is not supported with streaming right now. Once the feature is added, include_usage should be enabled as well. |
Pull Request Description
When
stream=true
, OpenAI API does not requirestream_options
to be specified. This will workHowever, currently when
stream=true
, AIBrix gateway specifically checks forstream_options={"include_usage":true}
. This PR simply removes the check.Note from @Jeffwan
Related Issues
Resolves: #[Insert issue number(s)]
Important: Before submitting, please complete the description above and review the checklist below.
Contribution Guidelines (Expand for Details)
We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:
Pull Request Title Format
Your PR title should start with one of these prefixes to indicate the nature of the change:
[Bug]
: Corrections to existing functionality[CI]
: Changes to build process or CI pipeline[Docs]
: Updates or additions to documentation[API]
: Modifications to aibrix's API or interface[CLI]
: Changes or additions to the Command Line Interface[Misc]
: For changes not covered above (use sparingly)Note: For changes spanning multiple categories, use multiple prefixes in order of importance.
Submission Checklist
By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.