Add DeepInfra model with Reasoning support for OpenAILike deepseek models #2197
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
DEEPINFRA_API_KEY
environment variable for authentication.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
Checklist
./scripts/format.sh
and./scripts/validate.sh
have been run to ensure code is formatted and linted.Additional Notes
DEEPINFRA_API_KEY
environment variable as documented in the new cookbook examples.