Conversation
…s) and E2E verification Made-with: Cursor
…penalties) onto upstream main Made-with: Cursor
JiwaniZakir
left a comment
There was a problem hiding this comment.
The HasField check on top_logprobs in proto_to_sampling_params (message_util.py) is likely broken: in protobuf3, HasField only works on message-type fields and oneof members — calling it on a scalar like top_logprobs (presumably an int32) will raise ValueError at runtime, so the lambda fallback lambda _: False silently swallows this and top_logprobs will never be populated. The correct approach for a scalar proto3 field is to check proto.top_logprobs != 0 or add it unconditionally with a sentinel default, depending on whether 0 is a valid value.
Additionally, docs/README.md contains a hardcoded personal path (/Users/zicheng/Downloads/parallax-main) throughout the "quick copy-paste" examples — this will be confusing or misleading for any other contributor and should use a placeholder like <project-root> or rely on the cd "$(dirname "$0")/.." pattern already used in compile_proto.sh.
📋 PR Title Format
feat(api): OpenAI advanced sampling params (logprobs, logit_bias, penalties)
📝 Change Type
Please select the type of change this PR introduces (choose one or more):
💡 Description
✅ Checklist
Please ensure the following points are addressed before merging: