Conversation
…es types in new responses module; update Groq, Huggingface, and BaseOpenAI providers to utilize these conversions.
…ource type across the codebase; modify response methods in AnyLLM and providers to align with new type definitions.
…to feat/openresponses
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
daavoo
left a comment
There was a problem hiding this comment.
Just a minor 💅 comment but anyhow I am fine with the changes
| from abc import ABC, abstractmethod | ||
| from typing import TYPE_CHECKING, Any, ClassVar | ||
|
|
||
| from openresponses_types import ResponseResource |
There was a problem hiding this comment.
Wdyt about making our any_llm.types.responses.Response a union type that includes the old Response and the new ResponseResource?
Would there be any downside?
We would avoid having to update imports and return types everywhere.
There was a problem hiding this comment.
I think I would rather not right now. People that are currently using the Responses API likely associate the Response object exported by any-llm as an alias for the OpenAI type, so if we make it a union then I worry people will be confused without a clear indication of the problem. By adding our Union typing then at least we make it obvious that changes are in process.
|
Integration tests: https://github.com/mozilla-ai/any-llm/actions/runs/21439569005 |
Description
This PR adds support for the OpenResponses Spec, which extends the OpenAI Responses spec.
See https://huggingface.co/blog/open-responses
This PR uses the python pydantic models autogenerated from the spec via https://github.com/mozilla-ai/openresponses-python
PR Type
Relevant issues
Checklist
AI Usage Information
I ended up only using CC to help me type faster. When I let it think and make decisions, it kept trying to make more changes than needed and complicating things.
When answering questions by the reviewer, please respond yourself, do not copy/paste the reviewer comments into an AI system and paste back its answer. We want to discuss with you, not your AI :)