[Router] use call_id instead of id for matching function calls in Responses API for Harmony#13056
[Router] use call_id instead of id for matching function calls in Responses API for Harmony#13056key4ng merged 2 commits intosgl-project:mainfrom
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Since there is no ut added for this, please use Accuracy Tests section to upload the before vs after fix for this. |
|
Can you fix regular/responses as well? Otherwise, can we update PR title to indicate this is for Harmony only? |
|
Hi @CatherineSue, I've added three screenshots to the PR description.
Edit: updated the title |
|
pls run |
|
Hi @key4ng , done |
|
It seems the fmt check still failed |
0ec467f to
e1ed434
Compare
|
Hi @CatherineSue The fmt error came from the |
I see. I think that was added by someone else. No need to change it for now. |
Motivation
Fix function call matching logic in sgl-router's Responses API implementation to comply with OpenAI specification.
Currently, the router incorrectly uses the
idfield to matchfunction_callandfunction_call_outputitems. According to OpenAI's Responses API spec,function_call_outputonly requirescall_idfield (whereidis optional), and matching should be done viacall_id.Refer: https://platform.openai.com/docs/guides/function-calling
Modifications
src/routers/grpc/harmony/responses.rsto usecall_idinstead ofidsrc/routers/grpc/harmony/builder.rsto usecall_idinstead ofidAccuracy Tests
Benchmarking and Profiling
N/A
Checklist