Skip to content

Conversation

D1m7asis
Copy link

This PR introduces AI/ML API support as a provider in Marvin.

Changes:

  • Added AIMLAPIProvider in marvin.providers, extending Pydantic AI’s provider system.

  • Registered provider in __init__.py.

  • New example: examples/provider_specific/aimlapi/run_agent.py shows how to run an agent with AI/ML API.

  • Docs updated:

    • README mentions AI/ML API as a supported provider.
    • Installation guide explains AIML_API_KEY environment variable.
    • Config guide lists AI/ML API among available providers.

Features:

  • OpenAI-compatible interface via AI/ML API.
  • 300+ models accessible (OpenAI, Anthropic, Google, Meta, Alibaba, etc.).
  • Simple usage with marvin.Agent and Pydantic AI models.

Reference: #1171

Screenshot: image

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.
@Copilot Copilot AI review requested due to automatic review settings August 25, 2025 12:58
@github-actions github-actions bot added documentation Improvements or additions to documentation example labels Aug 25, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

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 AIMLAPIProvider class 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.

Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

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

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation example

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants