Skip to content

Conversation

@dutchfarao
Copy link

@dutchfarao dutchfarao commented Nov 3, 2025

This PR adds the ability to register pydantic-ai agents and expose them as an OpenAI compatible endpoint. The registry allows you to register agents that can be either exposed as /v1/chat/completions and/or /v1/responses endpoint. The /v1/models endpoint derives all the unique models by their names that exist in the AgentRegistry.

Streaming support for responses API has not been implemented yet, can be done in a follow up PR.

@dutchfarao dutchfarao force-pushed the feat/fastapi_openai_spec branch 12 times, most recently from b81d7ab to 4705ba1 Compare November 3, 2025 21:33
@DouweM
Copy link
Collaborator

DouweM commented Nov 3, 2025

@dutchfarao Nice work! @Kludex Please have a look

@dutchfarao dutchfarao force-pushed the feat/fastapi_openai_spec branch 8 times, most recently from 9c28ece to 50430ae Compare November 3, 2025 22:27
@dutchfarao dutchfarao force-pushed the feat/fastapi_openai_spec branch from 50430ae to c054723 Compare November 3, 2025 22:33
@ion-elgreco
Copy link

Me and @dutchfarao are sitting at a bar here, trying to fix the CI. We are frustrated and are giving up haha, the CI should use markers instead of this try_import stuff😆

Would like your support here

@dutchfarao
Copy link
Author

Me and @dutchfarao are sitting at a bar here, trying to fix the CI. We are frustrated and are giving up haha, the CI should use markers instead of this try_import stuff😆

Would like your support here

The 20 force pushes were an indication

Signed-off-by: Ion Koutsouris <[email protected]>
@ion-elgreco ion-elgreco force-pushed the feat/fastapi_openai_spec branch from ddadb21 to 964fd4d Compare November 4, 2025 10:17
@ion-elgreco
Copy link

Resolved the CI, having a clear mind helps ;)

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.

Add support for registering Pydantic-AI agents as OpenAI-compatible endpoints

4 participants