-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Support the OpenAI Responses API #5270
Description
Background
OpenAI is moving to the responses API. Mostly they support the older chat completions API still, but in some cases they don't and we throw an error.
https://platform.openai.com/docs/guides/migrate-to-responses
https://platform.openai.com/docs/api-reference/responses
Job to do
Add the new API to the OpenAI provider (goose/crates/goose/src/providers/openai.rs). Make this the default for actual OpenAI calls but allow for a switch in custom providers to choose between the old and the new, either by adding a protocol field to the DeclarativeProviderConfig or by having a different OpenAI provider type.
Acceptance
We can declare that this works if OpenAI works well (./scripts/test_providers.sh runs), you can create custom providers with the old and the new and that the current declarative providers still work and that we can upgrade them to the new protocol