Repository navigation
Conversation
response.output_text.annotation.added was unhandled in the Chat Completions bridge, so stream=True dropped citations that stream=False already returned. Fixes BerriAI#43817 Signed-off-by: GokayAI <[email protected]>
0351089 to
ba37068
Compare
|
| raw_annotation = parsed_chunk.get("annotation") | ||
| annotations = LiteLLMResponsesTransformationHandler._convert_annotations_to_chat_format( | ||
| [raw_annotation] if raw_annotation is not None else None | ||
| ) |
| """True unless the guardrail is request-only (``pre_call`` / ``pre_mcp_call``). | ||
|
|
||
| Streaming fast-path gates must not treat a purely pre-call guardrail as a | ||
| reason to pay the per-chunk ``async_post_call_streaming_hook`` path. | ||
| """ |
There was a problem hiding this comment.
Redundant comments violate guidance These docstrings restate simple predicates. Similar comments appear in the annotation branch and tests. Repository guidance permits comments only for necessary complex logic, tool inputs, or TODOs; this requirement must be met before merging
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Type-discipline gate failed: the new list wrappers for annotation.added exceeded the LIT002 ceiling. Match existing stream-branch annotations. Signed-off-by: GokayAI <[email protected]>
|
I have read the CLA Document and I hereby sign the CLA |
Keep mutable-ok on the list-literal line and satisfy ruff format. Signed-off-by: GokayAI <[email protected]>
Stream iterator calls the shared private converter; basedpyright budget failed once LIT002 cleared. Match other cross-class helper ignores. Signed-off-by: GokayAI <[email protected]>
Fixes
Fixes #43817
What
OpenAiResponsesToChatCompletionStreamIteratorhad no branch forresponse.output_text.annotation.added, so Chat Completions bridged to Responses (openai/responses/...) droppedurl_citationannotations whenstream=Trueeven thoughstream=Falsealready returned them.This maps that event onto
delta.annotationsthe same way native Chat Completions streams do.Test
Thanks!