Skip to content

Commit 2a98210

Browse files
committed
feat(executor): 重构执行器为 Flow 中间件架构,统一协议转换层
将 Executor 拆分为 Ingress/Dispatch/Egress 中间件管线, 引入 Flow Engine 统一请求生命周期管理。 重构 Converter 层以对齐 Codex/OpenAI/Claude 协议转换, 新增 schema_cleaner 和 translator_helpers 辅助模块。
1 parent 039ae13 commit 2a98210

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+5796
-1669
lines changed

internal/adapter/provider/adapter.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package provider
22

33
import (
4-
"context"
5-
"net/http"
6-
74
"github.com/awsl-project/maxx/internal/domain"
5+
"github.com/awsl-project/maxx/internal/flow"
86
)
97

108
// ProviderAdapter handles communication with upstream providers
@@ -13,10 +11,10 @@ type ProviderAdapter interface {
1311
SupportedClientTypes() []domain.ClientType
1412

1513
// Execute performs the proxy request to the upstream provider
16-
// It reads from ctx for ClientType, MappedModel, RequestBody
17-
// It writes the response to w
14+
// It reads from flow.Ctx for ClientType, MappedModel, RequestBody
15+
// It writes the response to c.Writer
1816
// Returns ProxyError on failure
19-
Execute(ctx context.Context, w http.ResponseWriter, req *http.Request, provider *domain.Provider) error
17+
Execute(c *flow.Ctx, provider *domain.Provider) error
2018
}
2119

2220
// AdapterFactory creates ProviderAdapter instances

0 commit comments

Comments
 (0)