Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DeepInfra model with Reasoning support for OpenAILike deepseek models #2197

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

coderberry
Copy link

@coderberry coderberry commented Feb 20, 2025

Description

  • Summary of changes:
    This PR introduces a new DeepInfra model integration into Agno along with several cookbook examples demonstrating asynchronous and synchronous usage, tool integration, and JSON output. It also updates the documentation within the DeepInfra model implementation to clarify attributes and usage. Finally, the PR adds reasoning support for OpenAILike reasoning models by extending the agent’s reasoning logic to handle DeepSeek-based models.

  • Related issues:
    This PR may be related to PR #2193

  • Motivation and context:
    The changes enhance Agno's support for DeepInfra's text generation models, enabling users to integrate and experiment with these models seamlessly. Adding comprehensive cookbook examples and improved documentation helps users understand how to configure and run DeepInfra agents, including advanced scenarios such as tool usage and JSON-formatted responses. Furthermore, the reasoning support extension ensures that agents leveraging OpenAILike models (with DeepSeek reasoning models) can produce more reliable and contextually relevant outputs.

  • Environment or dependencies:

    • Requires setting the DEEPINFRA_API_KEY environment variable for authentication.
    • No breaking dependency changes; ensure the virtual environment is updated as per the new cookbook instructions.
  • Impact on metrics:
    While there are no direct performance benchmarks updated by these changes, the integration and reasoning improvements are expected to enhance the overall quality and reliability of model outputs in Agno.


Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Model update (Addition or modification of models)
  • Other (please describe):

Checklist

  • Adherence to standards: Code complies with Agno's style guidelines and best practices.
  • Formatting and validation: ./scripts/format.sh and ./scripts/validate.sh have been run to ensure code is formatted and linted.
  • Self-review completed: A thorough review has been performed by the contributor(s).
  • Documentation: Docstrings and inline comments have been added or updated for any complex logic.
  • Examples and guides: Relevant cookbook examples have been included and updated.
  • Tested in a clean environment: Changes have been tested in a clean environment to confirm expected behavior.
  • Tests (optional): Tests have been added or updated to cover any new or changed functionality.

Additional Notes

  • Ensure that users set the DEEPINFRA_API_KEY environment variable as documented in the new cookbook examples.
  • The reasoning support for OpenAILike models now includes handling for DeepSeek models by checking if the model id contains "deepseek" and adjusting the reasoning agent accordingly.
  • No changes to existing functionality outside of the DeepInfra integration and reasoning logic.

@coderberry coderberry changed the title (WIP) Add DeepInfra model with Reasoning support for OpenAILike deepseek models Add DeepInfra model with Reasoning support for OpenAILike deepseek models Feb 20, 2025
@coderberry coderberry marked this pull request as ready for review February 20, 2025 18:08
@coderberry coderberry requested a review from a team as a code owner February 20, 2025 18:08
Copy link

@markab21 markab21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use r1 for the tag instead of deepseek.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants