-
Notifications
You must be signed in to change notification settings - Fork 3.5k
refactor: api gateway #12258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/proxy-api-server
Are you sure you want to change the base?
refactor: api gateway #12258
Conversation
- Updated SettingsPage to link to API Gateway settings. - Refactored ApiServerSettings to manage API Gateway settings including model groups and enabled endpoints. - Introduced new Redux actions and state management for API Gateway configuration. - Enhanced migration scripts to support new API Gateway fields and ensure backward compatibility. - Updated types to define GatewayEndpoint and ModelGroup structures.
Add dispose() method to StreamAbortController that explicitly removes
the abort event listener when stream ends normally. Previously, the
listener would only be removed when abort was triggered ({ once: true }),
but if the stream completed normally without abort, the listener would
remain attached until garbage collection.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
- Introduced new routes and services for handling OpenAI Responses API requests. - Implemented `AiSdkToOpenAIResponsesSSE` adapter for streaming responses. - Added `OpenAIResponsesSSEFormatter` for formatting SSE events. - Enhanced `MessageConverterFactory` to support 'openai-responses' format. - Updated `StreamAdapterFactory` to include OpenAI Responses streaming. - Created `ResponsesService` for direct passthrough to OpenAI Responses API. - Added validation and processing logic for OpenAI Responses API requests. - Implemented model compatibility checks for OpenAI Responses API.
|
Note This comment was translated by Claude. Directory names and variable names have all been changed from Original Content目录名、变量名,都从 apiServer 改为 apiGateway |
Note This comment was translated by Claude. Are we planning to only support API Gateway functionality? Do we still plan to expose Cherry's native capabilities in the future? Original Content我们是打算只支持 API Gateway 的功能吗?今后还准备暴露 Cherry 本身的能力吗? |
Note This comment was translated by Claude. This was discussed previously, it's just a naming change. apiServer can be confusing internally and externally. The functionality remains the same, still serving the CSaaS responsibility by exposing Cherry's capabilities to the outside. Original Content这是上次讨论过的,只是一个命名上的更改,apiserver在内外容易混淆。其功能不变,仍是为了CSaaS的职责,对外提供Cherry的能力 |


What this PR does
Before this PR:
/v1/chat/completions) and Anthropic Messages (/v1/messages) endpointsAfter this PR:
/v1/responsesendpoint) with streaminghttp://localhost:23333/{groupId}/v1/...) mapped to a specific provider/modelWhy we need it and why it was done in this way
The following tradeoffs were made:
createdAtas stable identifier sinceidcan be changed by user for URL customization/{groupId}/v1/...routes before standard API routesThe following alternatives were considered:
Breaking changes
ApiServerConfigtype is now deprecated, useApiGatewayConfiginstead (alias provided for backwards compatibility)modelGroups,enabledEndpoints,exposeToNetwork) with defaultsSpecial notes for your reviewer
response.created,response.output_text.delta,response.completed, etc.)Checklist
Release note