shinmentakezo07
Claude Opus 4.6
refactor(executor): split providers and preserve legacy entrypoints
3e5ab39 Download internal/runtime/executor/antigravity_executor.go from shimen/shinnmen: direct link, hf CLI and curl.
- Browser
- Download file 2.16 kB
-
https://huggingface.co/spaces/shimen/shinnmen/resolve/main/internal/runtime/executor/antigravity_executor.go
- Command line
-
hf download hf://spaces/shimen/shinnmen/internal/runtime/executor/antigravity_executor.go
-
curl -L -o antigravity_executor.go https://huggingface.co/spaces/shimen/shinnmen/resolve/main/internal/runtime/executor/antigravity_executor.go
2.16 kB
| package executor | |
| import ( | |
| "context" | |
| "net/http" | |
| "github.com/router-for-me/CLIProxyAPI/v6/internal/config" | |
| "github.com/router-for-me/CLIProxyAPI/v6/internal/registry" | |
| cliproxyauth "github.com/router-for-me/CLIProxyAPI/v6/sdk/cliproxy/auth" | |
| cliproxyexecutor "github.com/router-for-me/CLIProxyAPI/v6/sdk/cliproxy/executor" | |
| ) | |
| // AntigravityExecutor is a compatibility wrapper delegating to AntigravityExecutorRefactored. | |
| type AntigravityExecutor struct { | |
| ref *AntigravityExecutorRefactored | |
| } | |
| func NewAntigravityExecutor(cfg *config.Config) *AntigravityExecutor { | |
| return &AntigravityExecutor{ref: NewAntigravityExecutorRefactored(cfg)} | |
| } | |
| func (e *AntigravityExecutor) Identifier() string { return e.ref.Identifier() } | |
| func (e *AntigravityExecutor) PrepareRequest(req *http.Request, auth *cliproxyauth.Auth) error { | |
| return e.ref.PrepareRequest(req, auth) | |
| } | |
| func (e *AntigravityExecutor) HttpRequest(ctx context.Context, auth *cliproxyauth.Auth, req *http.Request) (*http.Response, error) { | |
| return e.ref.HttpRequest(ctx, auth, req) | |
| } | |
| func (e *AntigravityExecutor) Execute(ctx context.Context, auth *cliproxyauth.Auth, req cliproxyexecutor.Request, opts cliproxyexecutor.Options) (cliproxyexecutor.Response, error) { | |
| return e.ref.Execute(ctx, auth, req, opts) | |
| } | |
| func (e *AntigravityExecutor) ExecuteStream(ctx context.Context, auth *cliproxyauth.Auth, req cliproxyexecutor.Request, opts cliproxyexecutor.Options) (*cliproxyexecutor.StreamResult, error) { | |
| return e.ref.ExecuteStream(ctx, auth, req, opts) | |
| } | |
| func (e *AntigravityExecutor) Refresh(ctx context.Context, auth *cliproxyauth.Auth) (*cliproxyauth.Auth, error) { | |
| return e.ref.Refresh(ctx, auth) | |
| } | |
| func (e *AntigravityExecutor) CountTokens(ctx context.Context, auth *cliproxyauth.Auth, req cliproxyexecutor.Request, opts cliproxyexecutor.Options) (cliproxyexecutor.Response, error) { | |
| return e.ref.CountTokens(ctx, auth, req, opts) | |
| } | |
| // FetchAntigravityModels retrieves available models using the supplied auth. | |
| func FetchAntigravityModels(ctx context.Context, auth *cliproxyauth.Auth, cfg *config.Config) []*registry.ModelInfo { | |
| return FetchAntigravityModelsRefactored(ctx, auth, cfg) | |
| } | |