LLM Providers #52

Merged
Nunzi99 merged 8 commits from 29-aggiungere-llm-providers into main 2025-10-27 21:07:30 +01:00
Nunzi99 commented 2025-10-27 20:16:59 +01:00 (Migrated from github.com)
No description provided.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-10-27 21:02:50 +01:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR adds support for multiple LLM providers (OpenAI, Mistral, DeepSeek) alongside the existing Gemini and Ollama providers. The changes refactor model validation logic by moving it from the main Config class to the ModelsConfig class for better encapsulation.

  • Added imports and configuration for OpenAI, Mistral, and DeepSeek LLM providers
  • Refactored model validation from Config class to ModelsConfig class
  • Updated configuration files and environment variables to support new providers

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/app/configs.py Added new LLM provider imports, models configuration, and refactored validation logic into ModelsConfig class
pyproject.toml Added dependencies for openai, mistralai, and deepseek packages
configs.yaml Added configuration entries for gpt, deepseek, and mistral models
.env.example Added API key placeholders for OpenAI, Mistral, and DeepSeek services

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Pull Request Overview This PR adds support for multiple LLM providers (OpenAI, Mistral, DeepSeek) alongside the existing Gemini and Ollama providers. The changes refactor model validation logic by moving it from the main `Config` class to the `ModelsConfig` class for better encapsulation. - Added imports and configuration for OpenAI, Mistral, and DeepSeek LLM providers - Refactored model validation from `Config` class to `ModelsConfig` class - Updated configuration files and environment variables to support new providers ### Reviewed Changes Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments. | File | Description | | ---- | ----------- | | src/app/configs.py | Added new LLM provider imports, models configuration, and refactored validation logic into ModelsConfig class | | pyproject.toml | Added dependencies for openai, mistralai, and deepseek packages | | configs.yaml | Added configuration entries for gpt, deepseek, and mistral models | | .env.example | Added API key placeholders for OpenAI, Mistral, and DeepSeek services | --- 💡 <a href="/Berack96/upo-appAI/new/main/.github?filename=*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
@@ -54,6 +58,8 @@ class AppModel(BaseModel):
output_schema=output_schema
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-10-27 21:02:50 +01:00

The warning message is generic and doesn't identify which provider is affected. Consider including the provider name or class name in the message for easier debugging, e.g., f\"No {key} set in environment variables for {clazz.__name__}.\"

            log.warning(f"No {key} set in environment variables for {clazz.__name__}.")
The warning message is generic and doesn't identify which provider is affected. Consider including the provider name or class name in the message for easier debugging, e.g., `f\"No {key} set in environment variables for {clazz.__name__}.\"` ```suggestion log.warning(f"No {key} set in environment variables for {clazz.__name__}.") ```
@@ -76,0 +117,4 @@
model.model = clazz
def __validate_ollama_models(self) -> None:
"""
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-10-27 21:02:50 +01:00

The docstring mentions 'like Gemini' as an example but this method now validates multiple providers (OpenAI, Mistral, DeepSeek, Gemini). Update the description to be provider-agnostic, e.g., 'Validate models for online API-based providers.'

        Validate models for online API-based providers.
        Args:
            models: list of AppModel instances to validate
            clazz: class of the model (e.g. provider model class)
The docstring mentions 'like Gemini' as an example but this method now validates multiple providers (OpenAI, Mistral, DeepSeek, Gemini). Update the description to be provider-agnostic, e.g., 'Validate models for online API-based providers.' ```suggestion Validate models for online API-based providers. Args: models: list of AppModel instances to validate clazz: class of the model (e.g. provider model class) ```
Berack96 (Migrated from github.com) approved these changes 2025-10-27 21:07:29 +01:00
Sign in to join this conversation.