fix(api): fail-closed on unknown chat message fields and legacy function role - #580
fix(api): fail-closed on unknown chat message fields and legacy function role#580seonghobae wants to merge 3 commits into
Conversation
…closed otherwise Chat history: message-level audio and legacy function_call are null/empty omit no-ops; non-empty fail closed with named errors (including tools passthrough). Tip substrate from #577 assistant refusal/annotations honesty. Local full unit: 940 passed.
…ed otherwise OpenAI fine-tune style message weight is not applied on this gateway. Accept null/0/1 as honest no-ops; reject other types and values with invalid_message_weight. Tip substrate from #578. Local full unit: 943 passed.
…ion role Reject unsupported message keys with named unknown_message_fields (not silent strip or tools-passthrough smuggle). Reject legacy function role with invalid_message_role migration to tool. Tip substrate from #579. Local full unit: 947 passed.
|
Important Review skippedToo many files! This PR contains 134 files, which is 34 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (134)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
unknown_message_fields(not silent strip on orchestration or smuggle on tools passthrough).role: functionfails closed withinvalid_message_rolemigration totool.name,weight, nullrefusal/annotations/audio/function_call) remain omit-equivalent honesty no-ops.Test plan
pytest tests/test_message_unknown_fields_http_honesty.pypytest tests -q(947 passed)Product gates only: Full unit + Semgrep (Strix ignored). Independent non-author APPROVE still required.