refactor(executor): remove ClientAdapter and legacy fallback logic

- Deleted `ClientAdapter` implementation and associated fallback methods.
- Removed legacy executor logic from `codex`, `claude`, `gemini`, and `qwen` executors.
- Simplified `handlers` by eliminating `UnwrapError` handling and related dependencies.
- Cleaned up `model_registry` by removing logic associated with suspended clients.
- Updated `.gitignore` to ignore `.serena/` directory.
This commit is contained in:
Luis Pater
2025-09-24 21:09:36 +08:00
parent b86ed46845
commit a2c5fdaf66
8 changed files with 27 additions and 245 deletions

View File

@@ -41,9 +41,7 @@ func (e *CodexExecutor) PrepareRequest(_ *http.Request, _ *cliproxyauth.Auth) er
func (e *CodexExecutor) Execute(ctx context.Context, auth *cliproxyauth.Auth, req cliproxyexecutor.Request, opts cliproxyexecutor.Options) (cliproxyexecutor.Response, error) {
apiKey, baseURL := codexCreds(auth)
if apiKey == "" {
return NewClientAdapter("codex").Execute(ctx, auth, req, opts)
}
if baseURL == "" {
baseURL = "https://chatgpt.com/backend-api/codex"
}
@@ -136,9 +134,7 @@ func (e *CodexExecutor) Execute(ctx context.Context, auth *cliproxyauth.Auth, re
func (e *CodexExecutor) ExecuteStream(ctx context.Context, auth *cliproxyauth.Auth, req cliproxyexecutor.Request, opts cliproxyexecutor.Options) (<-chan cliproxyexecutor.StreamChunk, error) {
apiKey, baseURL := codexCreds(auth)
if apiKey == "" {
return NewClientAdapter("codex").ExecuteStream(ctx, auth, req, opts)
}
if baseURL == "" {
baseURL = "https://chatgpt.com/backend-api/codex"
}