feat(api): add OpenResponses API provider with provider-namespaced routes#11
Merged
feat(api): add OpenResponses API provider with provider-namespaced routes#11
Conversation
Convert the asciinema cast recording to webm format for broader compatibility and embedding support in documentation.
Implement full support for the OpenResponses specification (https://www.openresponses.org) as a first-class provider alongside OpenAI: - Add openresponses module with complete API types (types.rs) - Implement OpenResponses streaming format with lifecycle events (stream.rs) - Add /v1/responses endpoint for both streaming and non-streaming - Support text and message-based input formats - Include tool definitions, reasoning config, and metadata support - Add comprehensive tests for all OpenResponses functionality - Update README with OpenResponses documentation and examples - Update architecture spec to document the new module
Change endpoint structure from /v1/... to /{provider}/v1/...:
- /openai/v1/chat/completions
- /openai/v1/models
- /openai/v1/models/:model_id
- /openai/v1/responses
- /openresponses/v1/responses
Both /openai/v1/responses and /openresponses/v1/responses use the
same handler since the APIs are compatible.
- Update OpenAI examples to use /openai/v1/ base path - Add OpenResponses Python example (openresponses_client.py) - Update examples/README.md with comprehensive API documentation - Include quick API test examples with curl commands
- Create docs/api.md with comprehensive API reference - Simplify examples/README.md to focus on running examples - Include full endpoint documentation, request/response formats - Document streaming events for OpenResponses
- Update smoke test endpoints from /v1/... to /openai/v1/... - Add OpenResponses API tests (non-streaming, message input, streaming) - Update k6 benchmark endpoints for new route structure
Document that agents should use GitHub API with GITHUB_TOKEN when gh CLI tool is not available in cloud environments.
Add package.json with openai dependency for running the TypeScript example. Update .gitignore to exclude node_modules.
Resolve conflicts between OpenResponses provider implementation and main branch updates. - Keep both openresponses and responses_stream modules - Rename create_response to create_openresponses_response for OpenResponses API - Add OpenResponses documentation to README
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add full OpenResponses API provider support and restructure all API routes to use provider-namespaced pattern.
Why
How
src/openresponses/module with types and streaming support/{provider}/v1/{endpoint}docs/api.mdBreaking Changes⚠️
API routes have changed from
/v1/...to provider-namespaced format:/v1/chat/completions/openai/v1/chat/completions/v1/models/openai/v1/models/v1/models/:id/openai/v1/models/:id/v1/responses/openai/v1/responses/openresponses/v1/responses(new)Risk
Checklist