Skip to content

docs: add MLflow AI Gateway cookbook example#7511

Open
PattaraS wants to merge 3 commits intomicrosoft:mainfrom
PattaraS:add-mlflow-gateway-integration
Open

docs: add MLflow AI Gateway cookbook example#7511
PattaraS wants to merge 3 commits intomicrosoft:mainfrom
PattaraS:add-mlflow-gateway-integration

Conversation

@PattaraS
Copy link
Copy Markdown

@PattaraS PattaraS commented Apr 2, 2026

Why are these changes needed?

Adds a cookbook recipe showing how to use MLflow AI Gateway as an LLM backend for AutoGen agents. MLflow AI Gateway is a database-backed LLM proxy (MLflow ≥ 3.0) that provides a unified OpenAI-compatible API across 20+ providers with encrypted secrets management, fallback/retry, traffic splitting, and usage tracing.

The notebook demonstrates using OpenAIChatCompletionClient with a custom base_url pointing to the gateway — single-turn chat, multi-agent chat, and streaming examples. Includes screenshots of the gateway UI.

Related issue number

N/A — new documentation

Checks

  • I've included any doc changes needed for https://microsoft.github.io/autogen/.
  • I've added tests (if relevant) corresponding to the changes introduced in this PR.
  • I've made sure all auto checks have passed.

AI Disclosure

This pull request was AI-assisted by Claude. All content was reviewed and validated by a human contributor. Screenshots were captured manually from a running MLflow server.

@PattaraS PattaraS marked this pull request as draft April 2, 2026 09:17
@PattaraS PattaraS marked this pull request as ready for review April 9, 2026 09:27
@PattaraS
Copy link
Copy Markdown
Author

PattaraS commented Apr 9, 2026

@microsoft-github-policy-service agree company="Databricks"

Adds a Jupyter notebook demonstrating how to use MLflow AI Gateway as an
LLM backend for AutoGen agents via OpenAIChatCompletionClient with a
custom base_url pointing to the gateway's OpenAI-compatible endpoint.
Add screenshots for endpoint creation, budget tracking, and usage
tracing. Simplify prerequisites to UI-only setup with link to docs
for advanced options.
The model_client was closed in the multi-agent cell, causing the
subsequent streaming cell to fail with APIConnectionError. Moved
await model_client.close() to the last code cell.
@PattaraS PattaraS force-pushed the add-mlflow-gateway-integration branch from 202b7d7 to 2b379c8 Compare April 21, 2026 04:44
@PattaraS
Copy link
Copy Markdown
Author

Hi @victordibia, friendly ping on this PR. We're from the MLflow team and working on adding MLflow AI Gateway integration guides across major agent frameworks. MLflow AI Gateway (MLflow >= 3.0) is an open-source LLM proxy with built-in secrets management, fallback/retry, traffic splitting, and usage tracing. Since it exposes an OpenAI-compatible API, it works with AutoGen's OpenAIChatCompletionClient via base_url. This PR adds a cookbook recipe demonstrating that, with screenshots of the gateway UI. Happy to make any changes. Thanks!

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.

1 participant