Get the OpenAI model to use. Checks user preferences first, then falls back to system configuration. Returns: The model name string, or empty string if not configured.
()
| 435 | |
| 436 | |
| 437 | def get_openai_model(): |
| 438 | """ |
| 439 | Get the OpenAI model to use. |
| 440 | |
| 441 | Checks user preferences first, then falls back to system configuration. |
| 442 | |
| 443 | Returns: |
| 444 | The model name string, or empty string if not configured. |
| 445 | """ |
| 446 | # Check user preference first |
| 447 | pref_model = _get_preference_value('openai_api_model') |
| 448 | if pref_model: |
| 449 | return pref_model |
| 450 | |
| 451 | # Fall back to system configuration |
| 452 | return config.OPENAI_API_MODEL or '' |
| 453 | |
| 454 | |
| 455 | def get_ollama_api_url(): |
no test coverage detected