Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add OpenAI responses API support for GPT-5 models#1597

Merged
tusharmath merged 7 commits into
tailcallhq:mainfrom
sebyx07:openai-v1-responses
Sep 26, 2025
Merged

feat: add OpenAI responses API support for GPT-5 models#1597
tusharmath merged 7 commits into
tailcallhq:mainfrom
sebyx07:openai-v1-responses

Conversation

@sebyx07

@sebyx07 sebyx07 commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Implements support for OpenAI's new /v1/responses endpoint for GPT-5 models
  • Adds automatic routing to the new endpoint based on model type
  • Maintains full backward compatibility with existing /v1/chat/completions endpoint

Changes

  • Added ResponsesRequest and ResponsesResponse DTOs for the new endpoint
  • Implemented inner_responses() method in OpenAI provider
  • Added smart routing logic that uses /v1/responses for GPT-5 models
  • All other models continue using the existing chat completions endpoint

Related Issue

Closes #1582

Migration Guide

As referenced in OpenAI's migration guide, the /v1/responses endpoint provides enhanced capabilities for newer models like GPT-5.

Test Plan

  • Verify existing models continue working with /v1/chat/completions
  • Test GPT-5 models route correctly to /v1/responses
  • Confirm streaming works with both endpoints
  • Check that all existing tests pass

🤖 Generated with Claude Code

Co-Authored-By: ForgeCode [email protected]

- Add ResponsesRequest and ResponsesResponse DTOs for v1/responses endpoint
- Implement automatic routing to v1/responses for GPT-5 models
- Maintain backward compatibility with existing v1/chat/completions

🤖 Generated with Claude Code

Co-Authored-By: ForgeCode <[email protected]>
@CLAassistant

CLAassistant commented Sep 25, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Sep 25, 2025
Comment thread crates/forge_app/src/dto/openai/responses.rs
- Fix Rust syntax error by properly nesting if-let with conditional checks
- Resolve clippy formatting suggestions

🤖 Generated with Claude Code

Co-Authored-By: ForgeCode <[email protected]>
Comment thread crates/forge_app/src/dto/openai/responses.rs Outdated
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Comment thread crates/forge_app/src/dto/openai/responses.rs
@tusharmath tusharmath changed the title feat: add OpenAI v1/responses API support for GPT-5 models feat: add OpenAI responses API support for GPT-5 models Sep 25, 2025
@tusharmath

Copy link
Copy Markdown
Collaborator

@sebyx07 I have made the changes with syntax fixes. Can you try it once and confirm if its working.

Comment thread crates/forge_app/src/dto/openai/responses.rs
@sebyx07

sebyx07 commented Sep 25, 2025

Copy link
Copy Markdown
Contributor Author

yes works

@tusharmath tusharmath enabled auto-merge (squash) September 26, 2025 10:30
@tusharmath tusharmath merged commit 1fb1602 into tailcallhq:main Sep 26, 2025
9 checks passed
@sebyx07 sebyx07 deleted the openai-v1-responses branch September 26, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for OpenAI's /v1/responses

3 participants