fix: address three bug detection findings

- rubrik: use 'is not None' check for tool call IDs to allow empty-string IDs
- router: indent mode preservation mutation to match warning conditional
- responses transformation: add missing 'continue' after OUTPUT_TEXT_DONE handler

Co-authored-by: Yassin Kortam <yassin@berri.ai>
This commit is contained in:
Cursor Agent 2026-05-20 21:29:44 +00:00
parent 8d41db4e57
commit c1d9bb7c10
No known key found for this signature in database
3 changed files with 5 additions and 2 deletions

View file

@ -675,6 +675,7 @@ class LiteLLMResponsesTransformationHandler(CompletionTransformationBridge):
output_items=recovered_output_items,
text_only_items=recovered_text_only_items,
)
continue
# Merge text-only items into the recovered output items. Real
# OUTPUT_ITEM_DONE events take precedence at any given output_index,

View file

@ -515,7 +515,9 @@ class RubrikLogger(CustomGuardrail, CustomBatchLogger):
returned_tool_calls = message.get("tool_calls") or []
blocking_explanation = message.get("content", "")
allowed_ids = {tc["id"] for tc in returned_tool_calls if tc.get("id")}
allowed_ids = {
tc["id"] for tc in returned_tool_calls if tc.get("id") is not None
}
allowed_count = sum(1 for tc in all_tool_calls if tc.id in allowed_ids)
if allowed_count == len(all_tool_calls):

View file

@ -7342,7 +7342,7 @@ class Router:
_model_name,
_deployment_mode,
)
_shared_model_info["mode"] = _existing_shared_mode
_shared_model_info["mode"] = _existing_shared_mode
_backend_alias_cost = {_model_name: _shared_model_info}
if "responses/" in _model_name:
_stripped_model_name = _model_name.replace("responses/", "")