Initialize Google Gemini models.
(self)
| 612 | await self._create_client(config) |
| 613 | |
| 614 | async def _initialize_google_models(self): |
| 615 | """Initialize Google Gemini models.""" |
| 616 | chat_models = [ |
| 617 | { |
| 618 | "model_name": "google/gemini-2.5-flash", |
| 619 | "model_id": "gemini-2.5-flash", |
| 620 | "model_type": "chat/completions", |
| 621 | "reasoning": { |
| 622 | "reasoning": { |
| 623 | "enabled": True |
| 624 | } |
| 625 | }, |
| 626 | "temperature": self.default_temperature, |
| 627 | "max_completion_tokens": self.max_tokens, |
| 628 | }, |
| 629 | { |
| 630 | "model_name": "google/gemini-2.5-pro", |
| 631 | "model_id": "gemini-2.5-pro", |
| 632 | "model_type": "chat/completions", |
| 633 | "reasoning": { |
| 634 | "reasoning": { |
| 635 | "enabled": True |
| 636 | } |
| 637 | }, |
| 638 | "temperature": self.default_temperature, |
| 639 | "max_completion_tokens": self.max_tokens, |
| 640 | }, |
| 641 | { |
| 642 | "model_name": "google/gemini-3-pro-preview", |
| 643 | "model_id": "gemini-3-pro-preview", |
| 644 | "model_type": "chat/completions", |
| 645 | "reasoning": { |
| 646 | "reasoning": { |
| 647 | "enabled": True |
| 648 | } |
| 649 | }, |
| 650 | "temperature": self.default_temperature, |
| 651 | "max_completion_tokens": self.max_tokens, |
| 652 | }, |
| 653 | ] |
| 654 | |
| 655 | # Register Google models |
| 656 | for model in chat_models: |
| 657 | config = ModelConfig( |
| 658 | model_name=model["model_name"], |
| 659 | model_id=model["model_id"], |
| 660 | model_type=model["model_type"], |
| 661 | provider="google", |
| 662 | api_base=None, # Google Gemini doesn't use custom API base |
| 663 | api_key=os.getenv("GOOGLE_API_KEY"), |
| 664 | reasoning=model.get("reasoning"), |
| 665 | temperature=model.get("temperature"), |
| 666 | max_completion_tokens=model.get("max_completion_tokens"), |
| 667 | supports_streaming=True, |
| 668 | supports_functions=True, |
| 669 | supports_vision=True, |
| 670 | output_version=None, |
| 671 | fallback_model=None, |
no test coverage detected