lint: reformatted

This commit is contained in:
Yamac Ay 2026-09-10 10:27:36 +02:00
parent ba641d49e9
commit d184087e6e
No known key found for this signature in database
GPG key ID: D113B438819CA628

View file

@ -408,7 +408,7 @@ class GenAIHubOrchestrationConfig(OpenAIGPTConfig):
return response
@staticmethod
def _normalize_reasoning_content(raw: dict[str, object]) -> dict[str, object]: # mutable-ok: generic types
def _normalize_reasoning_content(raw: dict[str, object]) -> dict[str, object]: # mutable-ok: generic types
"""Normalize list-shaped reasoning_content to the string field litellm expects.
SAP AI Core forwards reasoning tokens from Gemini and other thinking models as:
@ -438,9 +438,7 @@ class GenAIHubOrchestrationConfig(OpenAIGPTConfig):
new_msg = {
**msg,
"thinking_blocks": thinking_blocks,
"reasoning_content": (
"\n".join(b["thinking"] for b in thinking_blocks if b["thinking"]) or None
),
"reasoning_content": ("\n".join(b["thinking"] for b in thinking_blocks if b["thinking"]) or None),
}
new_choices.append({**choice, "message": new_msg})
return {**raw, "choices": new_choices}