OpenAI made a migration tool to Responses API to s...
# proj-agent
c
OpenAI made a migration tool to Responses API to send us away from ChatCompletions. And… I think they might be right 🥹 I made Responses API work for
agent-sdk
, and it has features difficult or impossible to replicate with Completions: stateful; tool calls within reasoning, apparently https://github.com/openai/completions-responses-migration-pack https://github.com/All-Hands-AI/agent-sdk/pull/142
Their claims are • we see higher latency with ChatCompletions • the model may do more tool calls unnecessarily • we may see degraded performance
c
irrc they say with responses api, they saw 3% higher swebench lolsob
nod 1
so definitely nice to have
c
The PR converts on the fly and back, to completions. I'm starting to think we could maybe make a mixin or subclass for LLM, to work with Responses API fully, add the stateful version, and eval both 🤔 Maybe in a follow-up, so we can look at it in isolation
c
so the compatible version is just a temprorary hack, right? it still doesn't leverage the full potential of
responses
?
i wonder if we need to make some big changes in our Event/Message system's current hypothesis to support responses API..
c
The stateful version in particular... is very compatible conceptually, at least, with what we try to achieve! It has a Conversation, which can be stored remotely, and we don't need to pass history in that case (it has it!), also we are able to refer to a response by ID, and even delete it from the conversation... It is kinda cool 🤔
👀 1
The API does have also a stateless version, which they don't insist much about, because, they say, some customers need data retention policies etc
Either way we go on this, there is one small thing that doesn't feel great to me at the moment: if we pass through
completion
, then the tools are passed in openai tool format, which we converted to, and then need to convert again; I feel like it would be nice to pass directly a Tool array (maybe?), so that a
tool.to_responses()
can convert to its format. This is more of a stylistic note, though. Or maybe we could just support client code calling
llm.responses()
directly... which implies the agent 🤔
c
I feel like it would be nice to pass directly a Tool array (maybe?), so that a
tool.to_responses()
can convert to its forma
Yeah since we are already accepting
list[Message]
where
Message
is our custom format, i don't see why we can't do that 🤔
aha 1
and adding a
to_openai_response_format
method
that might just be cleaner
we can actually factor out the non-fn-call convert to a mixin since it has a bunch of helpful fn that is kinda make the file very long..
c
The example Robert’s “minimal sdk” proposal had, was from openai-agents, which does this https://github.com/openai/openai-agents-python?tab=readme-ov-file#quick-start This also feels a bit similar, they don’t strictly tie this sdk to Responses API, but they define a Session as persistence over a conversation id. On the other hand, using Responses, openai stores conversations by default.
n
so I saw some chatter on this on Jan's discord server. this responses api endpoint may be moat fuel ... IDK how things are gonna play out tho
c
Yes, I agree it is. Frankly, I think also it’s a sign of OpenAI’s market power, that they make their best model work a bit worse, with the widest used API out there. Just to channel developers to their new API, which stores stuff on OpenAI’s servers by default, needs reasoning but doesn’t send it to them, making them do some roundabout with “encrypted reasoning” if you insist to handle context yourself etc.
n
this seems like a REALLY good reason to NOT support it
openhands .... open heart ... open source .... closed to douchebaggery moats ... well .. it made sense in my head... but seriously .... PLEASE PLEASE PLEASE .... remember ... OpenAI is still largely owned by M$ .... I'll regularly reiterate that MS would gladly sell smallpox blankets in an extreme winter if they thot they could make a profit. 's why I don't use github, honestly.... I CANNOT trust MS to keep their word..... not that they'd give it in any medium other than a calvinball license document
c
I hear you, we can make the defaults the opposite, I’m sure: stateless (“store=False”), so no data stored, and use the encrypted stuff to provide reasoning. The Responses API does support this mode. It’s not default, but we can send parameters to apply it. Generally, the OpenAI docs say it’s for organizations that have requirements on zero data retention. So they had to make it possible. (On the other hand, I doubt only those orgs have a right to privacy. 🫠) Back to the functionality, though, the simple thing is, reasoning matters, we can see the model reasoning on DeepSeek and Gemini-2.5-Pro, and it’s pretty cool. OpenAI didn’t want to send it on completions API. So, umm, it made a new rule: if you want it with OpenAI models, you need to use Responses API. 😥 (I went ahead and read some recent Jan discord discussion, but it didn’t touch this aspect.)
n
nod naw I agree with you ... it's def a SHOULd be supported thing ... it's just shitty that they're pullin this crap.... an IDK.... I don't know how else to encourage peeps NOT blindly acquiesce to the nonstandardstandards
while yes, there's some legit reason for their assertion... I'd be willing to bet there's a buncha other reasons as well.... my guess would be some of the stuff emitted via reasoning may be uncomfortable to OpenAI were it to see the light of day in court, and openAi's been given a ruling that they must store "some" chats (but the definition of some hasn't been disclosed (widely?) in a fashion which would be usable as court evidence (meaning forensically autidable, etc) which means they'd (theoretically) be unable to alter them