feat: add AIMLAPI provider integration and example#1217
Conversation
Introduces AIMLAPIProvider in marvin.providers for AI/ML API support, including provider registration in __init__.py. Adds an example script demonstrating agent usage with AIMLAPI in examples/provider_specific/aimlapi/run_agent.py.
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for AI/ML API as a new provider in Marvin, enabling access to 300+ models through an OpenAI-compatible interface.
- Introduces
AIMLAPIProviderclass that extends Pydantic AI's provider system - Provides example usage demonstrating how to configure and use the AI/ML API provider with Marvin agents
- Updates documentation to include AI/ML API as a supported provider option
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/marvin/providers/aimlapi.py | New provider implementation with OpenAI-compatible interface for AI/ML API |
| src/marvin/providers/init.py | Exports the new AIMLAPIProvider class |
| examples/provider_specific/aimlapi/run_agent.py | Example demonstrating AI/ML API usage with Marvin agents |
| docs/installation.mdx | Adds AI/ML API setup instructions including environment variable configuration |
| docs/guides/configure-llms.mdx | Lists AI/ML API among supported providers |
| README.md | Updates description to mention AI/ML API support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
@D1m7asis @OctavianTheI i appreciate the effort going into the PR
i guess i was not anticipating your request in #1171 would require a new providers module
i am not really keen on the new module nor the readme change. it seems like if you're an openai compatible shim for providers, you could use one of the existing providers from pydantic ai and change the base url
why is that not the case? i.e. why not just add an example to examples?
|
closing! feel free to come back and address the questions |
This PR introduces AI/ML API support as a provider in Marvin.
Changes:
Added
AIMLAPIProviderinmarvin.providers, extending Pydantic AI’s provider system.Registered provider in
__init__.py.New example:
examples/provider_specific/aimlapi/run_agent.pyshows how to run an agent with AI/ML API.Docs updated:
AIML_API_KEYenvironment variable.Features:
marvin.Agentand Pydantic AI models.Reference: #1171
Screenshot: