[Tool] adjust_request to reasoning parser, and Gemma4 fixes (#39027)

Signed-off-by: Ben Browning <bbrownin@redhat.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ben Browning
2026-04-08 19:04:04 +00:00
committed by GitHub
co-authored by Claude Opus 4.6 Cursor
parent e24e0a43a4
commit 8477fe427d
12 changed files with 878 additions and 16 deletions
+9
View File
@@ -496,6 +496,15 @@ class DelegatingParser(Parser):
# No tool calls
return [], content
def adjust_request(
self, request: ChatCompletionRequest | ResponsesRequest
) -> ChatCompletionRequest | ResponsesRequest:
if self._reasoning_parser is not None:
request = self._reasoning_parser.adjust_request(request)
if self._tool_parser is not None:
request = self._tool_parser.adjust_request(request)
return request
def extract_reasoning_streaming(
self,
previous_text: str,