(self, request_data: dict, target_model: str)
| 71 | } |
| 72 | |
| 73 | def _build_payload(self, request_data: dict, target_model: str) -> dict: |
| 74 | payload = dict(request_data) |
| 75 | payload["model"] = target_model |
| 76 | if target_model in ("gemma-4-26b-a4b-it", "gemma-4-31b-it"): |
| 77 | payload.setdefault("extra_body", {}).setdefault("google", {})["thinking_config"] = {"thinking_level": "minimal"} |
| 78 | return payload |
| 79 | |
| 80 | async def handle_request(self, request_data: dict): |
| 81 | if not self.api_key: |