Initialize OpenAI models.
(self)
| 69 | logger.info(f"| Model manager initialized successfully with {len(self.models)} models.") |
| 70 | |
| 71 | async def _initialize_openai_models(self): |
| 72 | """Initialize OpenAI models.""" |
| 73 | # General chat/completions models |
| 74 | chat_models = [ |
| 75 | { |
| 76 | "model_name": "openai/gpt-4o", |
| 77 | "model_id": "gpt-4o", |
| 78 | "model_type": "chat/completions", |
| 79 | "temperature": self.default_temperature, |
| 80 | "max_completion_tokens": self.max_tokens, |
| 81 | "fallback_model": "openai/gpt-4.1" |
| 82 | }, |
| 83 | { |
| 84 | "model_name": "openai/gpt-4.1", |
| 85 | "model_type": "chat/completions", |
| 86 | "model_id": "gpt-4.1", |
| 87 | "temperature": self.default_temperature, |
| 88 | "max_completion_tokens": self.max_tokens, |
| 89 | "fallback_model": "openai/gpt-4o", |
| 90 | }, |
| 91 | ] |
| 92 | |
| 93 | # Responses API models |
| 94 | response_models = [ |
| 95 | { |
| 96 | "model_name": "openai/gpt-5", |
| 97 | "model_type": "responses", |
| 98 | "model_id": "gpt-5", |
| 99 | "reasoning": self.default_reasoning, |
| 100 | "max_output_tokens": self.max_tokens, |
| 101 | "fallback_model": "openai/o3", |
| 102 | }, |
| 103 | { |
| 104 | "model_name": "openai/gpt-5.1", |
| 105 | "model_type": "responses", |
| 106 | "model_id": "gpt-5.1", |
| 107 | "reasoning": self.default_reasoning, |
| 108 | "max_output_tokens": self.max_tokens, |
| 109 | "fallback_model": "openai/gpt-5", |
| 110 | }, |
| 111 | { |
| 112 | "model_name": "openai/o3", |
| 113 | "model_type": "responses", |
| 114 | "model_id": "o3", |
| 115 | "reasoning": self.default_reasoning, |
| 116 | "max_output_tokens": self.max_tokens, |
| 117 | "fallback_model": "openai/gpt-5.1", |
| 118 | } |
| 119 | ] |
| 120 | |
| 121 | # Transcription models |
| 122 | transcribe_models = [ |
| 123 | { |
| 124 | "model_name": "openai/gpt-4o-transcribe", |
| 125 | "model_type": "transcriptions", |
| 126 | "model_id": "gpt-4o-transcribe", |
| 127 | "fallback_model": "openai/gpt-4o-transcribe", |
| 128 | } |
no test coverage detected