SYMBOL INDEX (3936 symbols across 423 files)
FILE: cmd/fetch_antigravity_models/main.go
constant antigravityBaseURLDaily (line 37) | antigravityBaseURLDaily = "https://daily-cloudcode-pa.googleapis....
constant antigravitySandboxBaseURLDaily (line 38) | antigravitySandboxBaseURLDaily = "https://daily-cloudcode-pa.sandbox.goo...
constant antigravityBaseURLProd (line 39) | antigravityBaseURLProd = "https://cloudcode-pa.googleapis.com"
constant antigravityModelsPath (line 40) | antigravityModelsPath = "/v1internal:fetchAvailableModels"
function init (line 43) | func init() {
type modelOutput (line 49) | type modelOutput struct
type modelEntry (line 54) | type modelEntry struct
function main (line 66) | func main() {
function fetchModels (line 162) | func fetchModels(ctx context.Context, auth *coreauth.Auth) []modelEntry {
function metaStringValue (line 261) | func metaStringValue(m map[string]interface{}, key string) string {
FILE: cmd/server/main.go
function init (line 46) | func init() {
function main (line 56) | func main() {
FILE: examples/custom-provider/main.go
constant providerKey (line 39) | providerKey = "myprov"
constant fOpenAI (line 42) | fOpenAI = sdktr.Format("openai.chat")
constant fMyProv (line 45) | fMyProv = sdktr.Format("myprov.chat")
function init (line 51) | func init() {
type MyExecutor (line 67) | type MyExecutor struct
method Identifier (line 70) | func (MyExecutor) Identifier() string { return providerKey }
method PrepareRequest (line 82) | func (MyExecutor) PrepareRequest(req *http.Request, a *coreauth.Auth) ...
method Execute (line 115) | func (MyExecutor) Execute(ctx context.Context, a *coreauth.Auth, req c...
method HttpRequest (line 143) | func (MyExecutor) HttpRequest(ctx context.Context, a *coreauth.Auth, r...
method CountTokens (line 158) | func (MyExecutor) CountTokens(context.Context, *coreauth.Auth, clipexe...
method ExecuteStream (line 162) | func (MyExecutor) ExecuteStream(ctx context.Context, a *coreauth.Auth,...
method Refresh (line 171) | func (MyExecutor) Refresh(ctx context.Context, a *coreauth.Auth) (*cor...
function buildHTTPClient (line 94) | func buildHTTPClient(a *coreauth.Auth) *http.Client {
function upstreamEndpoint (line 105) | func upstreamEndpoint(a *coreauth.Auth) string {
function main (line 175) | func main() {
FILE: examples/http-request/main.go
constant providerKey (line 24) | providerKey = "echo"
type EchoExecutor (line 27) | type EchoExecutor struct
method Identifier (line 29) | func (EchoExecutor) Identifier() string { return providerKey }
method PrepareRequest (line 31) | func (EchoExecutor) PrepareRequest(req *http.Request, auth *coreauth.A...
method HttpRequest (line 43) | func (EchoExecutor) HttpRequest(ctx context.Context, auth *coreauth.Au...
method Execute (line 57) | func (EchoExecutor) Execute(context.Context, *coreauth.Auth, clipexec....
method ExecuteStream (line 61) | func (EchoExecutor) ExecuteStream(context.Context, *coreauth.Auth, cli...
method Refresh (line 65) | func (EchoExecutor) Refresh(context.Context, *coreauth.Auth) (*coreaut...
method CountTokens (line 69) | func (EchoExecutor) CountTokens(context.Context, *coreauth.Auth, clipe...
function main (line 73) | func main() {
FILE: examples/translator/main.go
function main (line 11) | func main() {
FILE: internal/access/config_access/provider.go
function Register (line 13) | func Register(cfg *sdkconfig.SDKConfig) {
type provider (line 31) | type provider struct
method Identifier (line 48) | func (p *provider) Identifier() string {
method Authenticate (line 55) | func (p *provider) Authenticate(_ context.Context, r *http.Request) (*...
function newProvider (line 36) | func newProvider(name string, keys []string) *provider {
function extractBearerToken (line 106) | func extractBearerToken(header string) string {
function normalizeKeys (line 120) | func normalizeKeys(keys []string) []string {
FILE: internal/access/reconcile.go
function ReconcileProviders (line 19) | func ReconcileProviders(oldCfg, newCfg *config.Config, existing []sdkacc...
function ApplyAccessProviders (line 82) | func ApplyAccessProviders(manager *sdkaccess.Manager, oldCfg, newCfg *co...
function identifierFromProvider (line 107) | func identifierFromProvider(provider sdkaccess.Provider) string {
function providerInstanceEqual (line 114) | func providerInstanceEqual(a, b sdkaccess.Provider) bool {
FILE: internal/api/handlers/management/api_tools.go
constant defaultAPICallTimeout (line 22) | defaultAPICallTimeout = 60 * time.Second
constant geminiOAuthClientID (line 25) | geminiOAuthClientID = "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j...
constant geminiOAuthClientSecret (line 26) | geminiOAuthClientSecret = "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"
constant antigravityOAuthClientID (line 36) | antigravityOAuthClientID = "1071006060591-tmhssin2h21lcre235vtolojh4...
constant antigravityOAuthClientSecret (line 37) | antigravityOAuthClientSecret = "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"
type apiCallRequest (line 42) | type apiCallRequest struct
type apiCallResponse (line 52) | type apiCallResponse struct
method APICall (line 108) | func (h *Handler) APICall(c *gin.Context) {
function firstNonEmptyString (line 218) | func firstNonEmptyString(values ...*string) string {
function tokenValueForAuth (line 230) | func tokenValueForAuth(auth *coreauth.Auth) string {
method resolveTokenForAuth (line 250) | func (h *Handler) resolveTokenForAuth(ctx context.Context, auth *coreaut...
method refreshGeminiOAuthAccessToken (line 268) | func (h *Handler) refreshGeminiOAuthAccessToken(ctx context.Context, aut...
method refreshAntigravityOAuthAccessToken (line 338) | func (h *Handler) refreshAntigravityOAuthAccessToken(ctx context.Context...
function antigravityTokenNeedsRefresh (line 437) | func antigravityTokenNeedsRefresh(metadata map[string]any) bool {
function int64Value (line 458) | func int64Value(raw any) int64 {
function geminiOAuthMetadata (line 493) | func geminiOAuthMetadata(auth *coreauth.Auth) (map[string]any, func(map[...
function stringValue (line 511) | func stringValue(metadata map[string]any, key string) string {
function cloneMap (line 521) | func cloneMap(in map[string]any) map[string]any {
function buildOAuthTokenMap (line 532) | func buildOAuthTokenMap(base map[string]any, tok *oauth2.Token) map[stri...
function buildOAuthTokenFields (line 551) | func buildOAuthTokenFields(tok *oauth2.Token, merged map[string]any) map...
function tokenValueFromMetadata (line 571) | func tokenValueFromMetadata(metadata map[string]any) string {
method authByIndex (line 615) | func (h *Handler) authByIndex(authIndex string) *coreauth.Auth {
method apiCallTransport (line 633) | func (h *Handler) apiCallTransport(auth *coreauth.Auth) http.RoundTripper {
function buildProxyTransport (line 661) | func buildProxyTransport(proxyStr string) *http.Transport {
FILE: internal/api/handlers/management/api_tools_test.go
function TestAPICallTransportDirectBypassesGlobalProxy (line 13) | func TestAPICallTransportDirectBypassesGlobalProxy(t *testing.T) {
function TestAPICallTransportInvalidAuthFallsBackToGlobalProxy (line 32) | func TestAPICallTransportInvalidAuthFallsBackToGlobalProxy(t *testing.T) {
function TestAuthByIndexDistinguishesSharedAPIKeysAcrossProviders (line 61) | func TestAuthByIndexDistinguishesSharedAPIKeysAcrossProviders(t *testing...
FILE: internal/api/handlers/management/auth_files.go
constant anthropicCallbackPort (line 46) | anthropicCallbackPort = 54545
constant geminiCallbackPort (line 47) | geminiCallbackPort = 8085
constant codexCallbackPort (line 48) | codexCallbackPort = 1455
constant geminiCLIEndpoint (line 49) | geminiCLIEndpoint = "https://cloudcode-pa.googleapis.com"
constant geminiCLIVersion (line 50) | geminiCLIVersion = "v1internal"
type callbackForwarder (line 53) | type callbackForwarder struct
function extractLastRefreshTimestamp (line 64) | func extractLastRefreshTimestamp(meta map[string]any) (time.Time, bool) {
function parseLastRefreshValue (line 78) | func parseLastRefreshValue(v any) (time.Time, bool) {
function isWebUIRequest (line 117) | func isWebUIRequest(c *gin.Context) bool {
function startCallbackForwarder (line 130) | func startCallbackForwarder(port int, provider, targetBase string) (*cal...
function stopCallbackForwarderInstance (line 190) | func stopCallbackForwarderInstance(port int, forwarder *callbackForwarde...
function stopForwarderInstance (line 203) | func stopForwarderInstance(port int, forwarder *callbackForwarder) {
method managementCallbackURL (line 223) | func (h *Handler) managementCallbackURL(path string) (string, error) {
method ListAuthFiles (line 237) | func (h *Handler) ListAuthFiles(c *gin.Context) {
method GetAuthFileModels (line 262) | func (h *Handler) GetAuthFileModels(c *gin.Context) {
method listAuthFilesFromDisk (line 310) | func (h *Handler) listAuthFilesFromDisk(c *gin.Context) {
method buildAuthFileEntry (line 358) | func (h *Handler) buildAuthFileEntry(auth *coreauth.Auth) gin.H {
function extractCodexIDTokenClaims (line 467) | func extractCodexIDTokenClaims(auth *coreauth.Auth) gin.H {
function authEmail (line 507) | func authEmail(auth *coreauth.Auth) string {
function authAttribute (line 527) | func authAttribute(auth *coreauth.Auth, key string) string {
function isRuntimeOnlyAuth (line 534) | func isRuntimeOnlyAuth(auth *coreauth.Auth) bool {
method DownloadAuthFile (line 542) | func (h *Handler) DownloadAuthFile(c *gin.Context) {
method UploadAuthFile (line 567) | func (h *Handler) UploadAuthFile(c *gin.Context) {
method DeleteAuthFile (line 633) | func (h *Handler) DeleteAuthFile(c *gin.Context) {
method findAuthForDelete (line 711) | func (h *Handler) findAuthForDelete(name string) *coreauth.Auth {
method authIDForPath (line 737) | func (h *Handler) authIDForPath(path string) string {
method registerAuthFromFile (line 758) | func (h *Handler) registerAuthFromFile(ctx context.Context, path string,...
method PatchAuthFileStatus (line 823) | func (h *Handler) PatchAuthFileStatus(c *gin.Context) {
method PatchAuthFileFields (line 889) | func (h *Handler) PatchAuthFileFields(c *gin.Context) {
method disableAuth (line 988) | func (h *Handler) disableAuth(ctx context.Context, id string) {
method deleteTokenRecord (line 1017) | func (h *Handler) deleteTokenRecord(ctx context.Context, path string) er...
method tokenStoreWithBaseDir (line 1028) | func (h *Handler) tokenStoreWithBaseDir() coreauth.Store {
method saveTokenRecord (line 1045) | func (h *Handler) saveTokenRecord(ctx context.Context, record *coreauth....
method RequestAnthropicToken (line 1061) | func (h *Handler) RequestAnthropicToken(c *gin.Context) {
method RequestGeminiCLIToken (line 1206) | func (h *Handler) RequestGeminiCLIToken(c *gin.Context) {
method RequestCodexToken (line 1465) | func (h *Handler) RequestCodexToken(c *gin.Context) {
method RequestAntigravityToken (line 1611) | func (h *Handler) RequestAntigravityToken(c *gin.Context) {
method RequestQwenToken (line 1776) | func (h *Handler) RequestQwenToken(c *gin.Context) {
method RequestKimiToken (line 1832) | func (h *Handler) RequestKimiToken(c *gin.Context) {
method RequestIFlowToken (line 1909) | func (h *Handler) RequestIFlowToken(c *gin.Context) {
method RequestIFlowCookieToken (line 2023) | func (h *Handler) RequestIFlowCookieToken(c *gin.Context) {
type projectSelectionRequiredError (line 2118) | type projectSelectionRequiredError struct
method Error (line 2120) | func (e *projectSelectionRequiredError) Error() string {
function ensureGeminiProjectAndOnboard (line 2124) | func ensureGeminiProjectAndOnboard(ctx context.Context, httpClient *http...
function onboardAllGeminiProjects (line 2158) | func onboardAllGeminiProjects(ctx context.Context, httpClient *http.Clie...
function ensureGeminiProjectsEnabled (line 2192) | func ensureGeminiProjectsEnabled(ctx context.Context, httpClient *http.C...
function performGeminiCLISetup (line 2209) | func performGeminiCLISetup(ctx context.Context, httpClient *http.Client,...
function callGeminiCLI (line 2370) | func callGeminiCLI(ctx context.Context, httpClient *http.Client, endpoin...
function fetchGCPProjects (line 2419) | func fetchGCPProjects(ctx context.Context, httpClient *http.Client) ([]i...
function checkCloudAPIIsEnabled (line 2448) | func checkCloudAPIIsEnabled(ctx context.Context, httpClient *http.Client...
method GetAuthStatus (line 2508) | func (h *Handler) GetAuthStatus(c *gin.Context) {
function PopulateAuthContext (line 2532) | func PopulateAuthContext(ctx context.Context, c *gin.Context) context.Co...
FILE: internal/api/handlers/management/auth_files_delete_test.go
function TestDeleteAuthFile_UsesAuthPathFromManager (line 18) | func TestDeleteAuthFile_UsesAuthPathFromManager(t *testing.T) {
function TestDeleteAuthFile_FallbackToAuthDirPath (line 102) | func TestDeleteAuthFile_FallbackToAuthDirPath(t *testing.T) {
FILE: internal/api/handlers/management/config_basic.go
constant latestReleaseURL (line 22) | latestReleaseURL = "https://api.github.com/repos/router-for-me/CLI...
constant latestReleaseUserAgent (line 23) | latestReleaseUserAgent = "CLIProxyAPI"
method GetConfig (line 26) | func (h *Handler) GetConfig(c *gin.Context) {
type releaseInfo (line 34) | type releaseInfo struct
method GetLatestVersion (line 40) | func (h *Handler) GetLatestVersion(c *gin.Context) {
function WriteConfig (line 94) | func WriteConfig(path string, data []byte) error {
method PutConfigYAML (line 111) | func (h *Handler) PutConfigYAML(c *gin.Context) {
method GetConfigYAML (line 167) | func (h *Handler) GetConfigYAML(c *gin.Context) {
method GetDebug (line 185) | func (h *Handler) GetDebug(c *gin.Context) { c.JSON(200, gin.H{"debug": ...
method PutDebug (line 186) | func (h *Handler) PutDebug(c *gin.Context) { h.updateBoolField(c, func(v...
method GetUsageStatisticsEnabled (line 189) | func (h *Handler) GetUsageStatisticsEnabled(c *gin.Context) {
method PutUsageStatisticsEnabled (line 192) | func (h *Handler) PutUsageStatisticsEnabled(c *gin.Context) {
method GetLoggingToFile (line 197) | func (h *Handler) GetLoggingToFile(c *gin.Context) {
method PutLoggingToFile (line 200) | func (h *Handler) PutLoggingToFile(c *gin.Context) {
method GetLogsMaxTotalSizeMB (line 205) | func (h *Handler) GetLogsMaxTotalSizeMB(c *gin.Context) {
method PutLogsMaxTotalSizeMB (line 208) | func (h *Handler) PutLogsMaxTotalSizeMB(c *gin.Context) {
method GetErrorLogsMaxFiles (line 225) | func (h *Handler) GetErrorLogsMaxFiles(c *gin.Context) {
method PutErrorLogsMaxFiles (line 228) | func (h *Handler) PutErrorLogsMaxFiles(c *gin.Context) {
method GetRequestLog (line 245) | func (h *Handler) GetRequestLog(c *gin.Context) { c.JSON(200, gin.H{"req...
method PutRequestLog (line 246) | func (h *Handler) PutRequestLog(c *gin.Context) {
method GetWebsocketAuth (line 251) | func (h *Handler) GetWebsocketAuth(c *gin.Context) {
method PutWebsocketAuth (line 254) | func (h *Handler) PutWebsocketAuth(c *gin.Context) {
method GetRequestRetry (line 259) | func (h *Handler) GetRequestRetry(c *gin.Context) {
method PutRequestRetry (line 262) | func (h *Handler) PutRequestRetry(c *gin.Context) {
method GetMaxRetryInterval (line 267) | func (h *Handler) GetMaxRetryInterval(c *gin.Context) {
method PutMaxRetryInterval (line 270) | func (h *Handler) PutMaxRetryInterval(c *gin.Context) {
method GetForceModelPrefix (line 275) | func (h *Handler) GetForceModelPrefix(c *gin.Context) {
method PutForceModelPrefix (line 278) | func (h *Handler) PutForceModelPrefix(c *gin.Context) {
function normalizeRoutingStrategy (line 282) | func normalizeRoutingStrategy(strategy string) (string, bool) {
method GetRoutingStrategy (line 295) | func (h *Handler) GetRoutingStrategy(c *gin.Context) {
method PutRoutingStrategy (line 303) | func (h *Handler) PutRoutingStrategy(c *gin.Context) {
method GetProxyURL (line 321) | func (h *Handler) GetProxyURL(c *gin.Context) { c.JSON(200, gin.H{"proxy...
method PutProxyURL (line 322) | func (h *Handler) PutProxyURL(c *gin.Context) {
method DeleteProxyURL (line 325) | func (h *Handler) DeleteProxyURL(c *gin.Context) {
FILE: internal/api/handlers/management/config_lists.go
method putStringList (line 13) | func (h *Handler) putStringList(c *gin.Context, set func([]string), afte...
method patchStringList (line 37) | func (h *Handler) patchStringList(c *gin.Context, target *[]string, afte...
method deleteFromStringList (line 77) | func (h *Handler) deleteFromStringList(c *gin.Context, target *[]string,...
method GetAPIKeys (line 108) | func (h *Handler) GetAPIKeys(c *gin.Context) { c.JSON(200, gin.H{"api-ke...
method PutAPIKeys (line 109) | func (h *Handler) PutAPIKeys(c *gin.Context) {
method PatchAPIKeys (line 114) | func (h *Handler) PatchAPIKeys(c *gin.Context) {
method DeleteAPIKeys (line 117) | func (h *Handler) DeleteAPIKeys(c *gin.Context) {
method GetGeminiKeys (line 122) | func (h *Handler) GetGeminiKeys(c *gin.Context) {
method PutGeminiKeys (line 125) | func (h *Handler) PutGeminiKeys(c *gin.Context) {
method PatchGeminiKey (line 146) | func (h *Handler) PatchGeminiKey(c *gin.Context) {
method DeleteGeminiKey (line 215) | func (h *Handler) DeleteGeminiKey(c *gin.Context) {
method GetClaudeKeys (line 245) | func (h *Handler) GetClaudeKeys(c *gin.Context) {
method PutClaudeKeys (line 248) | func (h *Handler) PutClaudeKeys(c *gin.Context) {
method PatchClaudeKey (line 272) | func (h *Handler) PatchClaudeKey(c *gin.Context) {
method DeleteClaudeKey (line 337) | func (h *Handler) DeleteClaudeKey(c *gin.Context) {
method GetOpenAICompat (line 364) | func (h *Handler) GetOpenAICompat(c *gin.Context) {
method PutOpenAICompat (line 367) | func (h *Handler) PutOpenAICompat(c *gin.Context) {
method PatchOpenAICompat (line 395) | func (h *Handler) PatchOpenAICompat(c *gin.Context) {
method DeleteOpenAICompat (line 463) | func (h *Handler) DeleteOpenAICompat(c *gin.Context) {
method GetVertexCompatKeys (line 490) | func (h *Handler) GetVertexCompatKeys(c *gin.Context) {
method PutVertexCompatKeys (line 493) | func (h *Handler) PutVertexCompatKeys(c *gin.Context) {
method PatchVertexCompatKey (line 521) | func (h *Handler) PatchVertexCompatKey(c *gin.Context) {
method DeleteVertexCompatKey (line 602) | func (h *Handler) DeleteVertexCompatKey(c *gin.Context) {
method GetOAuthExcludedModels (line 629) | func (h *Handler) GetOAuthExcludedModels(c *gin.Context) {
method PutOAuthExcludedModels (line 633) | func (h *Handler) PutOAuthExcludedModels(c *gin.Context) {
method PatchOAuthExcludedModels (line 654) | func (h *Handler) PatchOAuthExcludedModels(c *gin.Context) {
method DeleteOAuthExcludedModels (line 692) | func (h *Handler) DeleteOAuthExcludedModels(c *gin.Context) {
method GetOAuthModelAlias (line 714) | func (h *Handler) GetOAuthModelAlias(c *gin.Context) {
method PutOAuthModelAlias (line 718) | func (h *Handler) PutOAuthModelAlias(c *gin.Context) {
method PatchOAuthModelAlias (line 739) | func (h *Handler) PatchOAuthModelAlias(c *gin.Context) {
method DeleteOAuthModelAlias (line 786) | func (h *Handler) DeleteOAuthModelAlias(c *gin.Context) {
method GetCodexKeys (line 811) | func (h *Handler) GetCodexKeys(c *gin.Context) {
method PutCodexKeys (line 814) | func (h *Handler) PutCodexKeys(c *gin.Context) {
method PatchCodexKey (line 845) | func (h *Handler) PatchCodexKey(c *gin.Context) {
method DeleteCodexKey (line 917) | func (h *Handler) DeleteCodexKey(c *gin.Context) {
function normalizeOpenAICompatibilityEntry (line 943) | func normalizeOpenAICompatibilityEntry(entry *config.OpenAICompatibility) {
function normalizedOpenAICompatibilityEntries (line 960) | func normalizedOpenAICompatibilityEntries(entries []config.OpenAICompati...
function normalizeClaudeKey (line 976) | func normalizeClaudeKey(entry *config.ClaudeKey) {
function normalizeCodexKey (line 1001) | func normalizeCodexKey(entry *config.CodexKey) {
function normalizeVertexCompatKey (line 1027) | func normalizeVertexCompatKey(entry *config.VertexCompatKey) {
function sanitizedOAuthModelAlias (line 1053) | func sanitizedOAuthModelAlias(entries map[string][]config.OAuthModelAlia...
method GetAmpCode (line 1076) | func (h *Handler) GetAmpCode(c *gin.Context) {
method GetAmpUpstreamURL (line 1085) | func (h *Handler) GetAmpUpstreamURL(c *gin.Context) {
method PutAmpUpstreamURL (line 1094) | func (h *Handler) PutAmpUpstreamURL(c *gin.Context) {
method DeleteAmpUpstreamURL (line 1099) | func (h *Handler) DeleteAmpUpstreamURL(c *gin.Context) {
method GetAmpUpstreamAPIKey (line 1105) | func (h *Handler) GetAmpUpstreamAPIKey(c *gin.Context) {
method PutAmpUpstreamAPIKey (line 1114) | func (h *Handler) PutAmpUpstreamAPIKey(c *gin.Context) {
method DeleteAmpUpstreamAPIKey (line 1119) | func (h *Handler) DeleteAmpUpstreamAPIKey(c *gin.Context) {
method GetAmpRestrictManagementToLocalhost (line 1125) | func (h *Handler) GetAmpRestrictManagementToLocalhost(c *gin.Context) {
method PutAmpRestrictManagementToLocalhost (line 1134) | func (h *Handler) PutAmpRestrictManagementToLocalhost(c *gin.Context) {
method GetAmpModelMappings (line 1139) | func (h *Handler) GetAmpModelMappings(c *gin.Context) {
method PutAmpModelMappings (line 1148) | func (h *Handler) PutAmpModelMappings(c *gin.Context) {
method PatchAmpModelMappings (line 1161) | func (h *Handler) PatchAmpModelMappings(c *gin.Context) {
method DeleteAmpModelMappings (line 1188) | func (h *Handler) DeleteAmpModelMappings(c *gin.Context) {
method GetAmpForceModelMappings (line 1214) | func (h *Handler) GetAmpForceModelMappings(c *gin.Context) {
method PutAmpForceModelMappings (line 1223) | func (h *Handler) PutAmpForceModelMappings(c *gin.Context) {
method GetAmpUpstreamAPIKeys (line 1228) | func (h *Handler) GetAmpUpstreamAPIKeys(c *gin.Context) {
method PutAmpUpstreamAPIKeys (line 1237) | func (h *Handler) PutAmpUpstreamAPIKeys(c *gin.Context) {
method PatchAmpUpstreamAPIKeys (line 1253) | func (h *Handler) PatchAmpUpstreamAPIKeys(c *gin.Context) {
method DeleteAmpUpstreamAPIKeys (line 1290) | func (h *Handler) DeleteAmpUpstreamAPIKeys(c *gin.Context) {
function normalizeAmpUpstreamAPIKeyEntries (line 1335) | func normalizeAmpUpstreamAPIKeyEntries(entries []config.AmpUpstreamAPIKe...
function normalizeAPIKeysList (line 1358) | func normalizeAPIKeysList(keys []string) []string {
FILE: internal/api/handlers/management/handler.go
type attemptInfo (line 24) | type attemptInfo struct
constant attemptCleanupInterval (line 31) | attemptCleanupInterval = 1 * time.Hour
constant attemptMaxIdleTime (line 34) | attemptMaxIdleTime = 2 * time.Hour
type Handler (line 37) | type Handler struct
method startAttemptCleanup (line 74) | func (h *Handler) startAttemptCleanup() {
method purgeStaleAttempts (line 86) | func (h *Handler) purgeStaleAttempts() {
method SetConfig (line 108) | func (h *Handler) SetConfig(cfg *config.Config) { h.cfg = cfg }
method SetAuthManager (line 111) | func (h *Handler) SetAuthManager(manager *coreauth.Manager) { h.authMa...
method SetUsageStatistics (line 114) | func (h *Handler) SetUsageStatistics(stats *usage.RequestStatistics) {...
method SetLocalPassword (line 117) | func (h *Handler) SetLocalPassword(password string) { h.localPassword ...
method SetLogDirectory (line 120) | func (h *Handler) SetLogDirectory(dir string) {
method SetPostAuthHook (line 133) | func (h *Handler) SetPostAuthHook(hook coreauth.PostAuthHook) {
method Middleware (line 140) | func (h *Handler) Middleware() gin.HandlerFunc {
method persist (line 276) | func (h *Handler) persist(c *gin.Context) bool {
method updateBoolField (line 289) | func (h *Handler) updateBoolField(c *gin.Context, set func(bool)) {
method updateIntField (line 301) | func (h *Handler) updateIntField(c *gin.Context, set func(int)) {
method updateStringField (line 313) | func (h *Handler) updateStringField(c *gin.Context, set func(string)) {
function NewHandler (line 54) | func NewHandler(cfg *config.Config, configFilePath string, manager *core...
function NewHandlerWithoutConfigFilePath (line 103) | func NewHandlerWithoutConfigFilePath(cfg *config.Config, manager *coreau...
FILE: internal/api/handlers/management/logs.go
constant defaultLogFileName (line 20) | defaultLogFileName = "main.log"
constant logScannerInitialBuffer (line 21) | logScannerInitialBuffer = 64 * 1024
constant logScannerMaxBuffer (line 22) | logScannerMaxBuffer = 8 * 1024 * 1024
method GetLogs (line 26) | func (h *Handler) GetLogs(c *gin.Context) {
method DeleteLogs (line 88) | func (h *Handler) DeleteLogs(c *gin.Context) {
method GetRequestErrorLogs (line 150) | func (h *Handler) GetRequestErrorLogs(c *gin.Context) {
method GetRequestLogByID (line 214) | func (h *Handler) GetRequestLogByID(c *gin.Context) {
method DownloadRequestErrorLog (line 301) | func (h *Handler) DownloadRequestErrorLog(c *gin.Context) {
method logDirectory (line 356) | func (h *Handler) logDirectory() string {
method collectLogFiles (line 366) | func (h *Handler) collectLogFiles(dir string) ([]string, error) {
type logAccumulator (line 400) | type logAccumulator struct
method consumeFile (line 421) | func (acc *logAccumulator) consumeFile(path string) error {
method addLine (line 445) | func (acc *logAccumulator) addLine(raw string) {
method append (line 464) | func (acc *logAccumulator) append(line string) {
method result (line 471) | func (acc *logAccumulator) result() ([]string, int, int64) {
function newLogAccumulator (line 409) | func newLogAccumulator(cutoff int64, limit int) *logAccumulator {
function parseCutoff (line 478) | func parseCutoff(raw string) int64 {
function parseLimit (line 490) | func parseLimit(raw string) (int, error) {
function parseTimestamp (line 505) | func parseTimestamp(line string) int64 {
function isRotatedLogFile (line 520) | func isRotatedLogFile(name string) bool {
function rotationOrder (line 527) | func rotationOrder(name string) (int64, bool) {
function numericRotationOrder (line 537) | func numericRotationOrder(name string) (int64, bool) {
function timestampRotationOrder (line 552) | func timestampRotationOrder(name string) (int64, bool) {
FILE: internal/api/handlers/management/model_definitions.go
method GetStaticModelDefinitions (line 13) | func (h *Handler) GetStaticModelDefinitions(c *gin.Context) {
FILE: internal/api/handlers/management/oauth_callback.go
type oauthCallbackRequest (line 12) | type oauthCallbackRequest struct
method PostOAuthCallback (line 20) | func (h *Handler) PostOAuthCallback(c *gin.Context) {
FILE: internal/api/handlers/management/oauth_sessions.go
constant oauthSessionTTL (line 15) | oauthSessionTTL = 10 * time.Minute
constant maxOAuthStateLength (line 16) | maxOAuthStateLength = 128
type oauthSession (line 25) | type oauthSession struct
type oauthSessionStore (line 32) | type oauthSessionStore struct
method purgeExpiredLocked (line 48) | func (s *oauthSessionStore) purgeExpiredLocked(now time.Time) {
method Register (line 56) | func (s *oauthSessionStore) Register(state, provider string) {
method SetError (line 76) | func (s *oauthSessionStore) SetError(state, message string) {
method Complete (line 100) | func (s *oauthSessionStore) Complete(state string) {
method CompleteProvider (line 114) | func (s *oauthSessionStore) CompleteProvider(provider string) int {
method Get (line 135) | func (s *oauthSessionStore) Get(state string) (oauthSession, bool) {
method IsPending (line 147) | func (s *oauthSessionStore) IsPending(state, provider string) bool {
function newOAuthSessionStore (line 38) | func newOAuthSessionStore(ttl time.Duration) *oauthSessionStore {
function RegisterOAuthSession (line 171) | func RegisterOAuthSession(state, provider string) { oauthSessions.Regist...
function SetOAuthSessionError (line 173) | func SetOAuthSessionError(state, message string) { oauthSessions.SetErro...
function CompleteOAuthSession (line 175) | func CompleteOAuthSession(state string) { oauthSessions.Complete(state) }
function CompleteOAuthSessionsByProvider (line 177) | func CompleteOAuthSessionsByProvider(provider string) int {
function GetOAuthSession (line 181) | func GetOAuthSession(state string) (provider string, status string, ok b...
function IsOAuthSessionPending (line 189) | func IsOAuthSessionPending(state, provider string) bool {
function ValidateOAuthState (line 193) | func ValidateOAuthState(state string) error {
function NormalizeOAuthProvider (line 220) | func NormalizeOAuthProvider(provider string) (string, error) {
type oauthCallbackFilePayload (line 239) | type oauthCallbackFilePayload struct
function WriteOAuthCallbackFile (line 245) | func WriteOAuthCallbackFile(authDir, provider, state, code, errorMessage...
function WriteOAuthCallbackFileForPendingSession (line 274) | func WriteOAuthCallbackFileForPendingSession(authDir, provider, state, c...
FILE: internal/api/handlers/management/quota.go
method GetSwitchProject (line 6) | func (h *Handler) GetSwitchProject(c *gin.Context) {
method PutSwitchProject (line 9) | func (h *Handler) PutSwitchProject(c *gin.Context) {
method GetSwitchPreviewModel (line 13) | func (h *Handler) GetSwitchPreviewModel(c *gin.Context) {
method PutSwitchPreviewModel (line 16) | func (h *Handler) PutSwitchPreviewModel(c *gin.Context) {
FILE: internal/api/handlers/management/test_store_test.go
type memoryAuthStore (line 10) | type memoryAuthStore struct
method List (line 15) | func (s *memoryAuthStore) List(_ context.Context) ([]*coreauth.Auth, e...
method Save (line 26) | func (s *memoryAuthStore) Save(_ context.Context, auth *coreauth.Auth)...
method Delete (line 41) | func (s *memoryAuthStore) Delete(_ context.Context, id string) error {
method SetBaseDir (line 49) | func (s *memoryAuthStore) SetBaseDir(string) {}
FILE: internal/api/handlers/management/usage.go
type usageExportPayload (line 12) | type usageExportPayload struct
type usageImportPayload (line 18) | type usageImportPayload struct
method GetUsageStatistics (line 24) | func (h *Handler) GetUsageStatistics(c *gin.Context) {
method ExportUsageStatistics (line 36) | func (h *Handler) ExportUsageStatistics(c *gin.Context) {
method ImportUsageStatistics (line 49) | func (h *Handler) ImportUsageStatistics(c *gin.Context) {
FILE: internal/api/handlers/management/vertex_import.go
method ImportVertexCredential (line 17) | func (h *Handler) ImportVertexCredential(c *gin.Context) {
function valueAsString (line 119) | func valueAsString(v any) string {
function sanitizeVertexFilePart (line 131) | func sanitizeVertexFilePart(s string) string {
function labelForVertex (line 143) | func labelForVertex(projectID, email string) string {
FILE: internal/api/middleware/request_logging.go
constant maxErrorOnlyCapturedRequestBodyBytes (line 18) | maxErrorOnlyCapturedRequestBodyBytes int64 = 1 << 20
function RequestLoggingMiddleware (line 24) | func RequestLoggingMiddleware(logger logging.RequestLogger) gin.HandlerF...
function shouldSkipMethodForRequestLogging (line 71) | func shouldSkipMethodForRequestLogging(req *http.Request) bool {
function isResponsesWebsocketUpgrade (line 81) | func isResponsesWebsocketUpgrade(req *http.Request) bool {
function shouldCaptureRequestBody (line 91) | func shouldCaptureRequestBody(loggerEnabled bool, req *http.Request) bool {
function captureRequestInfo (line 111) | func captureRequestInfo(c *gin.Context, captureBody bool) (*RequestInfo,...
function shouldLogRequest (line 155) | func shouldLogRequest(path string) bool {
FILE: internal/api/middleware/request_logging_test.go
function TestShouldSkipMethodForRequestLogging (line 11) | func TestShouldSkipMethodForRequestLogging(t *testing.T) {
function TestShouldCaptureRequestBody (line 67) | func TestShouldCaptureRequestBody(t *testing.T) {
FILE: internal/api/middleware/response_writer.go
constant requestBodyOverrideContextKey (line 17) | requestBodyOverrideContextKey = "REQUEST_BODY_OVERRIDE"
type RequestInfo (line 20) | type RequestInfo struct
type ResponseWriterWrapper (line 31) | type ResponseWriterWrapper struct
method Write (line 71) | func (w *ResponseWriterWrapper) Write(data []byte) (int, error) {
method shouldBufferResponseBody (line 100) | func (w *ResponseWriterWrapper) shouldBufferResponseBody() bool {
method WriteString (line 121) | func (w *ResponseWriterWrapper) WriteString(data string) (int, error) {
method WriteHeader (line 149) | func (w *ResponseWriterWrapper) WriteHeader(statusCode int) {
method ensureHeadersCaptured (line 189) | func (w *ResponseWriterWrapper) ensureHeadersCaptured() {
method captureCurrentHeaders (line 196) | func (w *ResponseWriterWrapper) captureCurrentHeaders() {
method detectStreaming (line 214) | func (w *ResponseWriterWrapper) detectStreaming(contentType string) bo...
method processStreamingChunks (line 237) | func (w *ResponseWriterWrapper) processStreamingChunks(done chan struc...
method Finalize (line 257) | func (w *ResponseWriterWrapper) Finalize(c *gin.Context) error {
method cloneHeaders (line 318) | func (w *ResponseWriterWrapper) cloneHeaders() map[string][]string {
method extractAPIRequest (line 331) | func (w *ResponseWriterWrapper) extractAPIRequest(c *gin.Context) []by...
method extractAPIResponse (line 343) | func (w *ResponseWriterWrapper) extractAPIResponse(c *gin.Context) []b...
method extractAPIResponseTimestamp (line 355) | func (w *ResponseWriterWrapper) extractAPIResponseTimestamp(c *gin.Con...
method extractRequestBody (line 366) | func (w *ResponseWriterWrapper) extractRequestBody(c *gin.Context) []b...
method logRequest (line 387) | func (w *ResponseWriterWrapper) logRequest(requestBody []byte, statusC...
function NewResponseWriterWrapper (line 56) | func NewResponseWriterWrapper(w gin.ResponseWriter, logger logging.Reque...
FILE: internal/api/middleware/response_writer_test.go
function TestExtractRequestBodyPrefersOverride (line 10) | func TestExtractRequestBodyPrefersOverride(t *testing.T) {
function TestExtractRequestBodySupportsStringOverride (line 31) | func TestExtractRequestBodySupportsStringOverride(t *testing.T) {
FILE: internal/api/modules/amp/amp.go
type Option (line 19) | type Option
type AmpModule (line 27) | type AmpModule struct
method Name (line 99) | func (m *AmpModule) Name() string {
method forceModelMappings (line 104) | func (m *AmpModule) forceModelMappings() bool {
method Register (line 116) | func (m *AmpModule) Register(ctx modules.Context) error {
method getAuthMiddleware (line 163) | func (m *AmpModule) getAuthMiddleware(ctx modules.Context) gin.Handler...
method OnConfigUpdated (line 180) | func (m *AmpModule) OnConfigUpdated(cfg *config.Config) error {
method enableUpstreamProxy (line 260) | func (m *AmpModule) enableUpstreamProxy(upstreamURL string, settings *...
method hasModelMappingsChanged (line 293) | func (m *AmpModule) hasModelMappingsChanged(old *config.AmpCode, new *...
method hasAPIKeyChanged (line 327) | func (m *AmpModule) hasAPIKeyChanged(old *config.AmpCode, new *config....
method hasUpstreamAPIKeysChanged (line 337) | func (m *AmpModule) hasUpstreamAPIKeysChanged(old *config.AmpCode, new...
method GetModelMapper (line 397) | func (m *AmpModule) GetModelMapper() *DefaultModelMapper {
method getProxy (line 402) | func (m *AmpModule) getProxy() *httputil.ReverseProxy {
method setProxy (line 409) | func (m *AmpModule) setProxy(proxy *httputil.ReverseProxy) {
method IsRestrictedToLocalhost (line 416) | func (m *AmpModule) IsRestrictedToLocalhost() bool {
method setRestrictToLocalhost (line 423) | func (m *AmpModule) setRestrictToLocalhost(restrict bool) {
function New (line 56) | func New(opts ...Option) *AmpModule {
function NewLegacy (line 70) | func NewLegacy(accessManager *sdkaccess.Manager, authMiddleware gin.Hand...
function WithSecretSource (line 78) | func WithSecretSource(source SecretSource) Option {
function WithAccessManager (line 85) | func WithAccessManager(am *sdkaccess.Manager) Option {
function WithAuthMiddleware (line 92) | func WithAuthMiddleware(middleware gin.HandlerFunc) Option {
FILE: internal/api/modules/amp/amp_test.go
function TestAmpModule_Name (line 18) | func TestAmpModule_Name(t *testing.T) {
function TestAmpModule_New (line 25) | func TestAmpModule_New(t *testing.T) {
function TestAmpModule_Register_WithUpstream (line 45) | func TestAmpModule_Register_WithUpstream(t *testing.T) {
function TestAmpModule_Register_WithoutUpstream (line 81) | func TestAmpModule_Register_WithoutUpstream(t *testing.T) {
function TestAmpModule_Register_InvalidUpstream (line 118) | func TestAmpModule_Register_InvalidUpstream(t *testing.T) {
function TestAmpModule_OnConfigUpdated_CacheInvalidation (line 139) | func TestAmpModule_OnConfigUpdated_CacheInvalidation(t *testing.T) {
function TestAmpModule_OnConfigUpdated_NotEnabled (line 172) | func TestAmpModule_OnConfigUpdated_NotEnabled(t *testing.T) {
function TestAmpModule_OnConfigUpdated_URLRemoved (line 181) | func TestAmpModule_OnConfigUpdated_URLRemoved(t *testing.T) {
function TestAmpModule_OnConfigUpdated_NonMultiSourceSecret (line 194) | func TestAmpModule_OnConfigUpdated_NonMultiSourceSecret(t *testing.T) {
function TestAmpModule_AuthMiddleware_Fallback (line 207) | func TestAmpModule_AuthMiddleware_Fallback(t *testing.T) {
function TestAmpModule_SecretSource_FromConfig (line 238) | func TestAmpModule_SecretSource_FromConfig(t *testing.T) {
function TestAmpModule_ProviderAliasesAlwaysRegistered (line 278) | func TestAmpModule_ProviderAliasesAlwaysRegistered(t *testing.T) {
function TestAmpModule_hasUpstreamAPIKeysChanged_DetectsRemovedKeyWithDuplicateInput (line 316) | func TestAmpModule_hasUpstreamAPIKeysChanged_DetectsRemovedKeyWithDuplic...
function TestAmpModule_hasUpstreamAPIKeysChanged_IgnoresEmptyAndWhitespaceKeys (line 335) | func TestAmpModule_hasUpstreamAPIKeysChanged_IgnoresEmptyAndWhitespaceKe...
FILE: internal/api/modules/amp/fallback_handlers.go
type AmpRouteType (line 19) | type AmpRouteType
constant RouteTypeLocalProvider (line 23) | RouteTypeLocalProvider AmpRouteType = "LOCAL_PROVIDER"
constant RouteTypeModelMapping (line 25) | RouteTypeModelMapping AmpRouteType = "MODEL_MAPPING"
constant RouteTypeAmpCredits (line 27) | RouteTypeAmpCredits AmpRouteType = "AMP_CREDITS"
constant RouteTypeNoProvider (line 29) | RouteTypeNoProvider AmpRouteType = "NO_PROVIDER"
constant MappedModelContextKey (line 33) | MappedModelContextKey = "mapped_model"
function logAmpRouting (line 36) | func logAmpRouting(routeType AmpRouteType, requestedModel, resolvedModel...
type FallbackHandler (line 80) | type FallbackHandler struct
method SetModelMapper (line 108) | func (fh *FallbackHandler) SetModelMapper(mapper ModelMapper) {
method WrapHandler (line 114) | func (fh *FallbackHandler) WrapHandler(handler gin.HandlerFunc) gin.Ha...
function NewFallbackHandler (line 88) | func NewFallbackHandler(getProxy func() *httputil.ReverseProxy) *Fallbac...
function NewFallbackHandlerWithMapper (line 96) | func NewFallbackHandlerWithMapper(getProxy func() *httputil.ReverseProxy...
function filterAntropicBetaHeader (line 276) | func filterAntropicBetaHeader(c *gin.Context) {
function rewriteModelInRequest (line 287) | func rewriteModelInRequest(body []byte, newModel string) []byte {
function extractModelFromRequest (line 300) | func extractModelFromRequest(body []byte, c *gin.Context) string {
FILE: internal/api/modules/amp/fallback_handlers_test.go
function TestFallbackHandler_ModelMapping_PreservesThinkingSuffixAndRewritesResponse (line 16) | func TestFallbackHandler_ModelMapping_PreservesThinkingSuffixAndRewrites...
FILE: internal/api/modules/amp/gemini_bridge.go
function createGeminiBridgeHandler (line 19) | func createGeminiBridgeHandler(handler gin.HandlerFunc) gin.HandlerFunc {
FILE: internal/api/modules/amp/gemini_bridge_test.go
function TestCreateGeminiBridgeHandler_ActionParameterExtraction (line 11) | func TestCreateGeminiBridgeHandler_ActionParameterExtraction(t *testing....
function TestCreateGeminiBridgeHandler_InvalidPath (line 75) | func TestCreateGeminiBridgeHandler_InvalidPath(t *testing.T) {
FILE: internal/api/modules/amp/model_mapping.go
type ModelMapper (line 19) | type ModelMapper interface
type DefaultModelMapper (line 29) | type DefaultModelMapper struct
method MapModel (line 53) | func (m *DefaultModelMapper) MapModel(requestedModel string) string {
method UpdateMappings (line 113) | func (m *DefaultModelMapper) UpdateMappings(mappings []config.AmpModel...
method GetMappings (line 157) | func (m *DefaultModelMapper) GetMappings() map[string]string {
function NewModelMapper (line 36) | func NewModelMapper(mappings []config.AmpModelMapping) *DefaultModelMapp...
type regexMapping (line 168) | type regexMapping struct
FILE: internal/api/modules/amp/model_mapping_test.go
function TestNewModelMapper (line 10) | func TestNewModelMapper(t *testing.T) {
function TestNewModelMapper_Empty (line 27) | func TestNewModelMapper_Empty(t *testing.T) {
function TestModelMapper_MapModel_NoProvider (line 39) | func TestModelMapper_MapModel_NoProvider(t *testing.T) {
function TestModelMapper_MapModel_WithProvider (line 53) | func TestModelMapper_MapModel_WithProvider(t *testing.T) {
function TestModelMapper_MapModel_TargetWithThinkingSuffix (line 74) | func TestModelMapper_MapModel_TargetWithThinkingSuffix(t *testing.T) {
function TestModelMapper_MapModel_CaseInsensitive (line 93) | func TestModelMapper_MapModel_CaseInsensitive(t *testing.T) {
function TestModelMapper_MapModel_NotFound (line 113) | func TestModelMapper_MapModel_NotFound(t *testing.T) {
function TestModelMapper_MapModel_EmptyInput (line 127) | func TestModelMapper_MapModel_EmptyInput(t *testing.T) {
function TestModelMapper_UpdateMappings (line 140) | func TestModelMapper_UpdateMappings(t *testing.T) {
function TestModelMapper_UpdateMappings_SkipsInvalid (line 170) | func TestModelMapper_UpdateMappings_SkipsInvalid(t *testing.T) {
function TestModelMapper_GetMappings_ReturnsCopy (line 186) | func TestModelMapper_GetMappings_ReturnsCopy(t *testing.T) {
function TestModelMapper_Regex_MatchBaseWithoutParens (line 207) | func TestModelMapper_Regex_MatchBaseWithoutParens(t *testing.T) {
function TestModelMapper_Regex_ExactPrecedence (line 227) | func TestModelMapper_Regex_ExactPrecedence(t *testing.T) {
function TestModelMapper_Regex_InvalidPattern_Skipped (line 252) | func TestModelMapper_Regex_InvalidPattern_Skipped(t *testing.T) {
function TestModelMapper_Regex_CaseInsensitive (line 266) | func TestModelMapper_Regex_CaseInsensitive(t *testing.T) {
function TestModelMapper_SuffixPreservation (line 285) | func TestModelMapper_SuffixPreservation(t *testing.T) {
FILE: internal/api/modules/amp/proxy.go
function removeQueryValuesMatching (line 21) | func removeQueryValuesMatching(req *http.Request, key string, match stri...
type readCloser (line 50) | type readCloser struct
method Read (line 55) | func (rc *readCloser) Read(p []byte) (int, error) { return rc.r.Read(p) }
method Close (line 56) | func (rc *readCloser) Close() error { return rc.c.Close() }
function createReverseProxy (line 60) | func createReverseProxy(upstreamURL string, secretSource SecretSource) (...
function isStreamingResponse (line 214) | func isStreamingResponse(resp *http.Response) bool {
function proxyHandler (line 226) | func proxyHandler(proxy *httputil.ReverseProxy) gin.HandlerFunc {
function filterBetaFeatures (line 233) | func filterBetaFeatures(header, featureToRemove string) string {
FILE: internal/api/modules/amp/proxy_test.go
function gzipBytes (line 18) | func gzipBytes(b []byte) []byte {
function mkResp (line 27) | func mkResp(status int, hdr http.Header, body []byte) *http.Response {
function TestCreateReverseProxy_ValidURL (line 39) | func TestCreateReverseProxy_ValidURL(t *testing.T) {
function TestCreateReverseProxy_InvalidURL (line 49) | func TestCreateReverseProxy_InvalidURL(t *testing.T) {
function TestModifyResponse_GzipScenarios (line 56) | func TestModifyResponse_GzipScenarios(t *testing.T) {
function TestModifyResponse_UpdatesContentLengthHeader (line 161) | func TestModifyResponse_UpdatesContentLengthHeader(t *testing.T) {
function TestModifyResponse_SkipsStreamingResponses (line 199) | func TestModifyResponse_SkipsStreamingResponses(t *testing.T) {
function TestModifyResponse_DecompressesChunkedJSON (line 221) | func TestModifyResponse_DecompressesChunkedJSON(t *testing.T) {
function TestReverseProxy_InjectsHeaders (line 244) | func TestReverseProxy_InjectsHeaders(t *testing.T) {
function TestReverseProxy_EmptySecret (line 278) | func TestReverseProxy_EmptySecret(t *testing.T) {
function TestReverseProxy_StripsClientCredentialsFromHeadersAndQuery (line 313) | func TestReverseProxy_StripsClientCredentialsFromHeadersAndQuery(t *test...
function TestReverseProxy_InjectsMappedSecret_FromRequestContext (line 377) | func TestReverseProxy_InjectsMappedSecret_FromRequestContext(t *testing....
function TestReverseProxy_MappedSecret_FallsBackToDefault (line 422) | func TestReverseProxy_MappedSecret_FallsBackToDefault(t *testing.T) {
function TestReverseProxy_ErrorHandler (line 466) | func TestReverseProxy_ErrorHandler(t *testing.T) {
function TestReverseProxy_ErrorHandler_ContextCanceled (line 496) | func TestReverseProxy_ErrorHandler_ContextCanceled(t *testing.T) {
function TestReverseProxy_FullRoundTrip_Gzip (line 520) | func TestReverseProxy_FullRoundTrip_Gzip(t *testing.T) {
function TestReverseProxy_FullRoundTrip_PlainJSON (line 551) | func TestReverseProxy_FullRoundTrip_PlainJSON(t *testing.T) {
function TestIsStreamingResponse (line 583) | func TestIsStreamingResponse(t *testing.T) {
function TestFilterBetaFeatures (line 622) | func TestFilterBetaFeatures(t *testing.T) {
FILE: internal/api/modules/amp/response_rewriter.go
type ResponseRewriter (line 16) | type ResponseRewriter struct
method Write (line 33) | func (rw *ResponseRewriter) Write(data []byte) (int, error) {
method Flush (line 54) | func (rw *ResponseRewriter) Flush() {
method rewriteModelInResponse (line 73) | func (rw *ResponseRewriter) rewriteModelInResponse(data []byte) []byte {
method rewriteStreamChunk (line 108) | func (rw *ResponseRewriter) rewriteStreamChunk(chunk []byte) []byte {
function NewResponseRewriter (line 24) | func NewResponseRewriter(w gin.ResponseWriter, originalModel string) *Re...
FILE: internal/api/modules/amp/response_rewriter_test.go
function TestRewriteModelInResponse_TopLevel (line 7) | func TestRewriteModelInResponse_TopLevel(t *testing.T) {
function TestRewriteModelInResponse_ResponseModel (line 19) | func TestRewriteModelInResponse_ResponseModel(t *testing.T) {
function TestRewriteModelInResponse_ResponseCreated (line 31) | func TestRewriteModelInResponse_ResponseCreated(t *testing.T) {
function TestRewriteModelInResponse_NoModelField (line 43) | func TestRewriteModelInResponse_NoModelField(t *testing.T) {
function TestRewriteModelInResponse_EmptyOriginalModel (line 54) | func TestRewriteModelInResponse_EmptyOriginalModel(t *testing.T) {
function TestRewriteStreamChunk_SSEWithResponseModel (line 65) | func TestRewriteStreamChunk_SSEWithResponseModel(t *testing.T) {
function TestRewriteStreamChunk_MultipleEvents (line 77) | func TestRewriteStreamChunk_MultipleEvents(t *testing.T) {
function TestRewriteStreamChunk_MessageModel (line 91) | func TestRewriteStreamChunk_MessageModel(t *testing.T) {
function contains (line 103) | func contains(data, substr []byte) bool {
FILE: internal/api/modules/amp/routes.go
type clientAPIKeyContextKey (line 22) | type clientAPIKeyContextKey struct
function clientAPIKeyMiddleware (line 26) | func clientAPIKeyMiddleware() gin.HandlerFunc {
function getClientAPIKeyFromContext (line 42) | func getClientAPIKeyFromContext(ctx context.Context) string {
method localhostOnlyMiddleware (line 53) | func (m *AmpModule) localhostOnlyMiddleware() gin.HandlerFunc {
function noCORSMiddleware (line 97) | func noCORSMiddleware() gin.HandlerFunc {
method managementAvailabilityMiddleware (line 117) | func (m *AmpModule) managementAvailabilityMiddleware() gin.HandlerFunc {
function wrapManagementAuth (line 131) | func wrapManagementAuth(auth gin.HandlerFunc, prefixes ...string) gin.Ha...
method registerManagementRoutes (line 148) | func (m *AmpModule) registerManagementRoutes(engine *gin.Engine, baseHan...
method registerProviderAliases (line 265) | func (m *AmpModule) registerProviderAliases(engine *gin.Engine, baseHand...
FILE: internal/api/modules/amp/routes_test.go
function TestRegisterManagementRoutes (line 12) | func TestRegisterManagementRoutes(t *testing.T) {
function TestRegisterProviderAliases_AllProvidersRegistered (line 88) | func TestRegisterProviderAliases_AllProvidersRegistered(t *testing.T) {
function TestRegisterProviderAliases_DynamicModelsHandler (line 140) | func TestRegisterProviderAliases_DynamicModelsHandler(t *testing.T) {
function TestRegisterProviderAliases_V1Routes (line 166) | func TestRegisterProviderAliases_V1Routes(t *testing.T) {
function TestRegisterProviderAliases_V1BetaRoutes (line 199) | func TestRegisterProviderAliases_V1BetaRoutes(t *testing.T) {
function TestRegisterProviderAliases_NoAuthMiddleware (line 229) | func TestRegisterProviderAliases_NoAuthMiddleware(t *testing.T) {
function TestLocalhostOnlyMiddleware_PreventsSpoofing (line 249) | func TestLocalhostOnlyMiddleware_PreventsSpoofing(t *testing.T) {
function TestLocalhostOnlyMiddleware_HotReload (line 333) | func TestLocalhostOnlyMiddleware_HotReload(t *testing.T) {
FILE: internal/api/modules/amp/secret.go
type SecretSource (line 18) | type SecretSource interface
type cachedSecret (line 23) | type cachedSecret struct
type MultiSourceSecret (line 32) | type MultiSourceSecret struct
method Get (line 75) | func (s *MultiSourceSecret) Get(ctx context.Context) (string, error) {
method readFromFile (line 110) | func (s *MultiSourceSecret) readFromFile() (string, error) {
method updateCache (line 129) | func (s *MultiSourceSecret) updateCache(value string) {
method InvalidateCache (line 139) | func (s *MultiSourceSecret) InvalidateCache() {
method UpdateExplicitKey (line 146) | func (s *MultiSourceSecret) UpdateExplicitKey(key string) {
function NewMultiSourceSecret (line 43) | func NewMultiSourceSecret(explicitKey string, cacheTTL time.Duration) *M...
function NewMultiSourceSecretWithPath (line 60) | func NewMultiSourceSecretWithPath(explicitKey string, filePath string, c...
type StaticSecretSource (line 157) | type StaticSecretSource struct
method Get (line 167) | func (s *StaticSecretSource) Get(ctx context.Context) (string, error) {
function NewStaticSecretSource (line 162) | func NewStaticSecretSource(key string) *StaticSecretSource {
type MappedSecretSource (line 174) | type MappedSecretSource struct
method Get (line 191) | func (s *MappedSecretSource) Get(ctx context.Context) (string, error) {
method UpdateMappings (line 209) | func (s *MappedSecretSource) UpdateMappings(entries []config.AmpUpstre...
method UpdateDefaultExplicitKey (line 237) | func (s *MappedSecretSource) UpdateDefaultExplicitKey(key string) {
method InvalidateCache (line 244) | func (s *MappedSecretSource) InvalidateCache() {
function NewMappedSecretSource (line 181) | func NewMappedSecretSource(defaultSource SecretSource) *MappedSecretSour...
FILE: internal/api/modules/amp/secret_test.go
function TestMultiSourceSecret_PrecedenceOrder (line 17) | func TestMultiSourceSecret_PrecedenceOrder(t *testing.T) {
function TestMultiSourceSecret_CacheBehavior (line 62) | func TestMultiSourceSecret_CacheBehavior(t *testing.T) {
function TestMultiSourceSecret_FileHandling (line 110) | func TestMultiSourceSecret_FileHandling(t *testing.T) {
function TestMultiSourceSecret_Concurrency (line 170) | func TestMultiSourceSecret_Concurrency(t *testing.T) {
function TestStaticSecretSource (line 213) | func TestStaticSecretSource(t *testing.T) {
function TestMultiSourceSecret_CacheEmptyResult (line 250) | func TestMultiSourceSecret_CacheEmptyResult(t *testing.T) {
function TestMappedSecretSource_UsesMappingFromContext (line 286) | func TestMappedSecretSource_UsesMappingFromContext(t *testing.T) {
function TestMappedSecretSource_DuplicateClientKey_FirstWins (line 315) | func TestMappedSecretSource_DuplicateClientKey_FirstWins(t *testing.T) {
function TestMappedSecretSource_DuplicateClientKey_LogsWarning (line 339) | func TestMappedSecretSource_DuplicateClientKey_LogsWarning(t *testing.T) {
FILE: internal/api/modules/modules.go
type Context (line 17) | type Context struct
type RouteModule (line 29) | type RouteModule interface
type RouteModuleV2 (line 51) | type RouteModuleV2 interface
function RegisterModule (line 80) | func RegisterModule(ctx Context, mod interface{}) error {
FILE: internal/api/server.go
constant oauthCallbackSuccessHTML (line 43) | oauthCallbackSuccessHTML = `
Aut...
type serverOptionConfig (line 45) | type serverOptionConfig struct
type ServerOption (line 58) | type ServerOption
function defaultRequestLoggerFactory (line 60) | func defaultRequestLoggerFactory(cfg *config.Config, configPath string) ...
function WithMiddleware (line 67) | func WithMiddleware(mw ...gin.HandlerFunc) ServerOption {
function WithEngineConfigurator (line 74) | func WithEngineConfigurator(fn func(*gin.Engine)) ServerOption {
function WithRouterConfigurator (line 81) | func WithRouterConfigurator(fn func(*gin.Engine, *handlers.BaseAPIHandle...
function WithLocalManagementPassword (line 88) | func WithLocalManagementPassword(password string) ServerOption {
function WithKeepAliveEndpoint (line 95) | func WithKeepAliveEndpoint(timeout time.Duration, onTimeout func()) Serv...
function WithRequestLoggerFactory (line 107) | func WithRequestLoggerFactory(factory func(*config.Config, string) loggi...
function WithPostAuthHook (line 114) | func WithPostAuthHook(hook auth.PostAuthHook) ServerOption {
type Server (line 122) | type Server struct
method setupRoutes (line 319) | func (s *Server) setupRoutes() {
method AttachWebsocketRoute (line 441) | func (s *Server) AttachWebsocketRoute(path string, handler http.Handle...
method registerManagementRoutes (line 476) | func (s *Server) registerManagementRoutes() {
method managementAvailabilityMiddleware (line 646) | func (s *Server) managementAvailabilityMiddleware() gin.HandlerFunc {
method serveManagementControlPanel (line 656) | func (s *Server) serveManagementControlPanel(c *gin.Context) {
method enableKeepAlive (line 686) | func (s *Server) enableKeepAlive(timeout time.Duration, onTimeout func...
method handleKeepAlive (line 702) | func (s *Server) handleKeepAlive(c *gin.Context) {
method signalKeepAlive (line 724) | func (s *Server) signalKeepAlive() {
method watchKeepAlive (line 734) | func (s *Server) watchKeepAlive() {
method unifiedModelsHandler (line 768) | func (s *Server) unifiedModelsHandler(openaiHandler *openai.OpenAIAPIH...
method Start (line 788) | func (s *Server) Start() error {
method Stop (line 823) | func (s *Server) Stop(ctx context.Context) error {
method applyAccessConfig (line 862) | func (s *Server) applyAccessConfig(oldCfg, newCfg *config.Config) {
method UpdateClients (line 877) | func (s *Server) UpdateClients(cfg *config.Config) {
method SetWebsocketAuthChangeHandler (line 1016) | func (s *Server) SetWebsocketAuthChangeHandler(fn func(bool, bool)) {
function NewServer (line 191) | func NewServer(cfg *config.Config, authManager *auth.Manager, accessMana...
function corsMiddleware (line 847) | func corsMiddleware() gin.HandlerFunc {
function AuthMiddleware (line 1028) | func AuthMiddleware(manager *sdkaccess.Manager) gin.HandlerFunc {
FILE: internal/api/server_test.go
function newTestServer (line 20) | func newTestServer(t *testing.T) *Server {
function TestAmpProviderModelRoutes (line 49) | func TestAmpProviderModelRoutes(t *testing.T) {
function TestDefaultRequestLoggerFactory_UsesResolvedLogDirectory (line 115) | func TestDefaultRequestLoggerFactory_UsesResolvedLogDirectory(t *testing...
FILE: internal/auth/antigravity/auth.go
type TokenResponse (line 20) | type TokenResponse struct
type userInfo (line 28) | type userInfo struct
type AntigravityAuth (line 33) | type AntigravityAuth struct
method BuildAuthURL (line 51) | func (o *AntigravityAuth) BuildAuthURL(state, redirectURI string) stri...
method ExchangeCodeForTokens (line 67) | func (o *AntigravityAuth) ExchangeCodeForTokens(ctx context.Context, c...
method FetchUserInfo (line 111) | func (o *AntigravityAuth) FetchUserInfo(ctx context.Context, accessTok...
method FetchProjectID (line 155) | func (o *AntigravityAuth) FetchProjectID(ctx context.Context, accessTo...
method OnboardUser (line 245) | func (o *AntigravityAuth) OnboardUser(ctx context.Context, accessToken...
function NewAntigravityAuth (line 38) | func NewAntigravityAuth(cfg *config.Config, httpClient *http.Client) *An...
FILE: internal/auth/antigravity/constants.go
constant ClientID (line 6) | ClientID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.goog...
constant ClientSecret (line 7) | ClientSecret = "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"
constant CallbackPort (line 8) | CallbackPort = 51121
constant TokenEndpoint (line 22) | TokenEndpoint = "https://oauth2.googleapis.com/token"
constant AuthEndpoint (line 23) | AuthEndpoint = "https://accounts.google.com/o/oauth2/v2/auth"
constant UserInfoEndpoint (line 24) | UserInfoEndpoint = "https://www.googleapis.com/oauth2/v1/userinfo?alt=json"
constant APIEndpoint (line 29) | APIEndpoint = "https://cloudcode-pa.googleapis.com"
constant APIVersion (line 30) | APIVersion = "v1internal"
constant APIUserAgent (line 31) | APIUserAgent = "google-api-nodejs-client/9.15.1"
constant APIClient (line 32) | APIClient = "google-cloud-sdk vscode_cloudshelleditor/0.1"
constant ClientMetadata (line 33) | ClientMetadata = `{"ideType":"IDE_UNSPECIFIED","platform":"PLATFORM_UNSP...
FILE: internal/auth/antigravity/filename.go
function CredentialFileName (line 10) | func CredentialFileName(email string) string {
FILE: internal/auth/claude/anthropic.go
type PKCECodes (line 4) | type PKCECodes struct
type ClaudeTokenData (line 13) | type ClaudeTokenData struct
type ClaudeAuthBundle (line 25) | type ClaudeAuthBundle struct
FILE: internal/auth/claude/anthropic_auth.go
constant AuthURL (line 22) | AuthURL = "https://claude.ai/oauth/authorize"
constant TokenURL (line 23) | TokenURL = "https://api.anthropic.com/v1/oauth/token"
constant ClientID (line 24) | ClientID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e"
constant RedirectURI (line 25) | RedirectURI = "http://localhost:54545/callback"
type tokenResponse (line 30) | type tokenResponse struct
type ClaudeAuth (line 48) | type ClaudeAuth struct
method GenerateAuthURL (line 81) | func (o *ClaudeAuth) GenerateAuthURL(state string, pkceCodes *PKCECode...
method parseCodeAndState (line 110) | func (c *ClaudeAuth) parseCodeAndState(code string) (parsedCode, parse...
method ExchangeCodeForTokens (line 132) | func (o *ClaudeAuth) ExchangeCodeForTokens(ctx context.Context, code, ...
method RefreshTokens (line 221) | func (o *ClaudeAuth) RefreshTokens(ctx context.Context, refreshToken s...
method CreateTokenStorage (line 287) | func (o *ClaudeAuth) CreateTokenStorage(bundle *ClaudeAuthBundle) *Cla...
method RefreshTokensWithRetry (line 311) | func (o *ClaudeAuth) RefreshTokensWithRetry(ctx context.Context, refre...
method UpdateTokenStorage (line 343) | func (o *ClaudeAuth) UpdateTokenStorage(storage *ClaudeTokenStorage, t...
function NewClaudeAuth (line 61) | func NewClaudeAuth(cfg *config.Config) *ClaudeAuth {
FILE: internal/auth/claude/errors.go
type OAuthError (line 13) | type OAuthError struct
method Error (line 25) | func (e *OAuthError) Error() string {
function NewOAuthError (line 33) | func NewOAuthError(code, description string, statusCode int) *OAuthError {
type AuthenticationError (line 42) | type AuthenticationError struct
method Error (line 54) | func (e *AuthenticationError) Error() string {
function NewAuthenticationError (line 106) | func NewAuthenticationError(baseErr *AuthenticationError, cause error) *...
function IsAuthenticationError (line 116) | func IsAuthenticationError(err error) bool {
function IsOAuthError (line 123) | func IsOAuthError(err error) bool {
function GetUserFriendlyMessage (line 130) | func GetUserFriendlyMessage(err error) string {
FILE: internal/auth/claude/html_templates.go
constant LoginSuccessHtml (line 10) | LoginSuccessHtml = `
constant SetupNoticeHtml (line 214) | SetupNoticeHtml = `
FILE: internal/auth/claude/oauth_server.go
type OAuthServer (line 22) | type OAuthServer struct
method Start (line 72) | func (s *OAuthServer) Start() error {
method Stop (line 119) | func (s *OAuthServer) Stop(ctx context.Context) error {
method WaitForCallback (line 150) | func (s *OAuthServer) WaitForCallback(timeout time.Duration) (*OAuthRe...
method handleCallback (line 168) | func (s *OAuthServer) handleCallback(w http.ResponseWriter, r *http.Re...
method handleSuccess (line 231) | func (s *OAuthServer) handleSuccess(w http.ResponseWriter, r *http.Req...
method generateSuccessHTML (line 264) | func (s *OAuthServer) generateSuccessHTML(setupRequired bool, platform...
method sendResult (line 286) | func (s *OAuthServer) sendResult(result *OAuthResult) {
method isPortAvailable (line 300) | func (s *OAuthServer) isPortAvailable() bool {
method IsRunning (line 316) | func (s *OAuthServer) IsRunning() bool {
type OAuthResult (line 40) | type OAuthResult struct
function NewOAuthServer (line 58) | func NewOAuthServer(port int) *OAuthServer {
FILE: internal/auth/claude/pkce.go
function GeneratePKCECodes (line 21) | func GeneratePKCECodes() (*PKCECodes, error) {
function generateCodeVerifier (line 39) | func generateCodeVerifier() (string, error) {
function generateCodeChallenge (line 53) | func generateCodeChallenge(codeVerifier string) string {
FILE: internal/auth/claude/token.go
type ClaudeTokenStorage (line 18) | type ClaudeTokenStorage struct
method SetMetadata (line 46) | func (ts *ClaudeTokenStorage) SetMetadata(meta map[string]any) {
method SaveTokenToFile (line 60) | func (ts *ClaudeTokenStorage) SaveTokenToFile(authFilePath string) err...
FILE: internal/auth/claude/utls_transport.go
type utlsRoundTripper (line 20) | type utlsRoundTripper struct
method getOrCreateConnection (line 53) | func (t *utlsRoundTripper) getOrCreateConnection(host, addr string) (*...
method createConnection (line 101) | func (t *utlsRoundTripper) createConnection(host, addr string) (*http2...
method RoundTrip (line 126) | func (t *utlsRoundTripper) RoundTrip(req *http.Request) (*http.Respons...
function newUtlsRoundTripper (line 32) | func newUtlsRoundTripper(cfg *config.SDKConfig) *utlsRoundTripper {
function NewAnthropicHttpClient (line 158) | func NewAnthropicHttpClient(cfg *config.SDKConfig) *http.Client {
FILE: internal/auth/codex/errors.go
type OAuthError (line 10) | type OAuthError struct
method Error (line 22) | func (e *OAuthError) Error() string {
function NewOAuthError (line 30) | func NewOAuthError(code, description string, statusCode int) *OAuthError {
type AuthenticationError (line 39) | type AuthenticationError struct
method Error (line 51) | func (e *AuthenticationError) Error() string {
function NewAuthenticationError (line 110) | func NewAuthenticationError(baseErr *AuthenticationError, cause error) *...
function IsAuthenticationError (line 120) | func IsAuthenticationError(err error) bool {
function IsOAuthError (line 127) | func IsOAuthError(err error) bool {
function GetUserFriendlyMessage (line 134) | func GetUserFriendlyMessage(err error) string {
FILE: internal/auth/codex/filename.go
function CredentialFileName (line 12) | func CredentialFileName(email, planType, hashAccountID string, includePr...
function normalizePlanTypeForFilename (line 29) | func normalizePlanTypeForFilename(planType string) string {
FILE: internal/auth/codex/html_templates.go
constant LoginSuccessHtml (line 6) | LoginSuccessHtml = `
constant SetupNoticeHtml (line 210) | SetupNoticeHtml = `
FILE: internal/auth/codex/jwt_parser.go
type JWTClaims (line 14) | type JWTClaims struct
method GetUserEmail (line 94) | func (c *JWTClaims) GetUserEmail() string {
method GetAccountID (line 100) | func (c *JWTClaims) GetAccountID() string {
type Organizations (line 33) | type Organizations struct
type CodexAuthInfo (line 42) | type CodexAuthInfo struct
function ParseJWTToken (line 58) | func ParseJWTToken(token string) (*JWTClaims, error) {
function base64URLDecode (line 81) | func base64URLDecode(data string) ([]byte, error) {
FILE: internal/auth/codex/oauth_server.go
type OAuthServer (line 19) | type OAuthServer struct
method Start (line 69) | func (s *OAuthServer) Start() error {
method Stop (line 116) | func (s *OAuthServer) Stop(ctx context.Context) error {
method WaitForCallback (line 147) | func (s *OAuthServer) WaitForCallback(timeout time.Duration) (*OAuthRe...
method handleCallback (line 165) | func (s *OAuthServer) handleCallback(w http.ResponseWriter, r *http.Re...
method handleSuccess (line 228) | func (s *OAuthServer) handleSuccess(w http.ResponseWriter, r *http.Req...
method generateSuccessHTML (line 261) | func (s *OAuthServer) generateSuccessHTML(setupRequired bool, platform...
method sendResult (line 283) | func (s *OAuthServer) sendResult(result *OAuthResult) {
method isPortAvailable (line 297) | func (s *OAuthServer) isPortAvailable() bool {
method IsRunning (line 313) | func (s *OAuthServer) IsRunning() bool {
type OAuthResult (line 37) | type OAuthResult struct
function NewOAuthServer (line 55) | func NewOAuthServer(port int) *OAuthServer {
FILE: internal/auth/codex/openai.go
type PKCECodes (line 5) | type PKCECodes struct
type CodexTokenData (line 15) | type CodexTokenData struct
type CodexAuthBundle (line 32) | type CodexAuthBundle struct
FILE: internal/auth/codex/openai_auth.go
constant AuthURL (line 24) | AuthURL = "https://auth.openai.com/oauth/authorize"
constant TokenURL (line 25) | TokenURL = "https://auth.openai.com/oauth/token"
constant ClientID (line 26) | ClientID = "app_EMoamEEZ73f0CkXaXp7hrann"
constant RedirectURI (line 27) | RedirectURI = "http://localhost:1455/auth/callback"
type CodexAuth (line 33) | type CodexAuth struct
method GenerateAuthURL (line 48) | func (o *CodexAuth) GenerateAuthURL(state string, pkceCodes *PKCECodes...
method ExchangeCodeForTokens (line 73) | func (o *CodexAuth) ExchangeCodeForTokens(ctx context.Context, code st...
method ExchangeCodeForTokensWithRedirect (line 80) | func (o *CodexAuth) ExchangeCodeForTokensWithRedirect(ctx context.Cont...
method RefreshTokens (line 171) | func (o *CodexAuth) RefreshTokens(ctx context.Context, refreshToken st...
method CreateTokenStorage (line 245) | func (o *CodexAuth) CreateTokenStorage(bundle *CodexAuthBundle) *Codex...
method RefreshTokensWithRetry (line 262) | func (o *CodexAuth) RefreshTokensWithRetry(ctx context.Context, refres...
method UpdateTokenStorage (line 301) | func (o *CodexAuth) UpdateTokenStorage(storage *CodexTokenStorage, tok...
function NewCodexAuth (line 39) | func NewCodexAuth(cfg *config.Config) *CodexAuth {
function isNonRetryableRefreshErr (line 291) | func isNonRetryableRefreshErr(err error) bool {
FILE: internal/auth/codex/openai_auth_test.go
type roundTripFunc (line 12) | type roundTripFunc
method RoundTrip (line 14) | func (f roundTripFunc) RoundTrip(req *http.Request) (*http.Response, e...
function TestRefreshTokensWithRetry_NonRetryableOnlyAttemptsOnce (line 18) | func TestRefreshTokensWithRetry_NonRetryableOnlyAttemptsOnce(t *testing....
FILE: internal/auth/codex/pkce.go
function GeneratePKCECodes (line 17) | func GeneratePKCECodes() (*PKCECodes, error) {
function generateCodeVerifier (line 37) | func generateCodeVerifier() (string, error) {
function generateCodeChallenge (line 53) | func generateCodeChallenge(codeVerifier string) string {
FILE: internal/auth/codex/token.go
type CodexTokenStorage (line 18) | type CodexTokenStorage struct
method SetMetadata (line 42) | func (ts *CodexTokenStorage) SetMetadata(meta map[string]any) {
method SaveTokenToFile (line 56) | func (ts *CodexTokenStorage) SaveTokenToFile(authFilePath string) error {
FILE: internal/auth/empty/token.go
type EmptyStorage (line 9) | type EmptyStorage struct
method SaveTokenToFile (line 23) | func (ts *EmptyStorage) SaveTokenToFile(_ string) error {
FILE: internal/auth/gemini/gemini_auth.go
constant ClientID (line 31) | ClientID = "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.app...
constant ClientSecret (line 32) | ClientSecret = "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"
constant DefaultCallbackPort (line 33) | DefaultCallbackPort = 8085
type GeminiAuth (line 46) | type GeminiAuth struct
method GetAuthenticatedClient (line 74) | func (g *GeminiAuth) GetAuthenticatedClient(ctx context.Context, ts *G...
method createTokenStorage (line 140) | func (g *GeminiAuth) createTokenStorage(ctx context.Context, config *o...
method getTokenFromWeb (line 206) | func (g *GeminiAuth) getTokenFromWeb(ctx context.Context, config *oaut...
type WebLoginOptions (line 50) | type WebLoginOptions struct
function NewGeminiAuth (line 57) | func NewGeminiAuth() *GeminiAuth {
FILE: internal/auth/gemini/gemini_token.go
type GeminiTokenStorage (line 20) | type GeminiTokenStorage struct
method SetMetadata (line 45) | func (ts *GeminiTokenStorage) SetMetadata(meta map[string]any) {
method SaveTokenToFile (line 59) | func (ts *GeminiTokenStorage) SaveTokenToFile(authFilePath string) err...
function CredentialFileName (line 93) | func CredentialFileName(email, projectID string, includeProviderPrefix b...
FILE: internal/auth/iflow/cookie_helpers.go
function NormalizeCookie (line 12) | func NormalizeCookie(raw string) (string, error) {
function SanitizeIFlowFileName (line 29) | func SanitizeIFlowFileName(raw string) string {
function ExtractBXAuth (line 44) | func ExtractBXAuth(cookie string) string {
function CheckDuplicateBXAuth (line 57) | func CheckDuplicateBXAuth(authDir, bxAuth string) (string, error) {
FILE: internal/auth/iflow/iflow_auth.go
constant iFlowOAuthTokenEndpoint (line 22) | iFlowOAuthTokenEndpoint = "https://iflow.cn/oauth/token"
constant iFlowOAuthAuthorizeEndpoint (line 23) | iFlowOAuthAuthorizeEndpoint = "https://iflow.cn/oauth"
constant iFlowUserInfoEndpoint (line 24) | iFlowUserInfoEndpoint = "https://iflow.cn/api/oauth/getUserInfo"
constant iFlowSuccessRedirectURL (line 25) | iFlowSuccessRedirectURL = "https://iflow.cn/oauth/success"
constant iFlowAPIKeyEndpoint (line 28) | iFlowAPIKeyEndpoint = "https://platform.iflow.cn/api/openapi/apikey"
constant iFlowOAuthClientID (line 31) | iFlowOAuthClientID = "10009311001"
constant iFlowOAuthClientSecret (line 32) | iFlowOAuthClientSecret = "4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW"
constant DefaultAPIBaseURL (line 36) | DefaultAPIBaseURL = "https://apis.iflow.cn/v1"
constant SuccessRedirectURL (line 39) | SuccessRedirectURL = iFlowSuccessRedirectURL
constant CallbackPort (line 42) | CallbackPort = 11451
type IFlowAuth (line 45) | type IFlowAuth struct
method AuthorizationURL (line 56) | func (ia *IFlowAuth) AuthorizationURL(state string, port int) (authURL...
method ExchangeCodeForTokens (line 69) | func (ia *IFlowAuth) ExchangeCodeForTokens(ctx context.Context, code, ...
method RefreshTokens (line 86) | func (ia *IFlowAuth) RefreshTokens(ctx context.Context, refreshToken s...
method newTokenRequest (line 101) | func (ia *IFlowAuth) newTokenRequest(ctx context.Context, form url.Val...
method doTokenRequest (line 114) | func (ia *IFlowAuth) doTokenRequest(ctx context.Context, req *http.Req...
method FetchUserInfo (line 170) | func (ia *IFlowAuth) FetchUserInfo(ctx context.Context, accessToken st...
method CreateTokenStorage (line 215) | func (ia *IFlowAuth) CreateTokenStorage(data *IFlowTokenData) *IFlowTo...
method UpdateTokenStorage (line 232) | func (ia *IFlowAuth) UpdateTokenStorage(storage *IFlowTokenStorage, da...
method AuthenticateWithCookie (line 307) | func (ia *IFlowAuth) AuthenticateWithCookie(ctx context.Context, cooki...
method fetchAPIKeyInfo (line 336) | func (ia *IFlowAuth) fetchAPIKeyInfo(ctx context.Context, cookie strin...
method RefreshAPIKey (line 398) | func (ia *IFlowAuth) RefreshAPIKey(ctx context.Context, cookie, name s...
method CreateCookieTokenStorage (line 492) | func (ia *IFlowAuth) CreateCookieTokenStorage(data *IFlowTokenData) *I...
method UpdateCookieTokenStorage (line 515) | func (ia *IFlowAuth) UpdateCookieTokenStorage(storage *IFlowTokenStora...
function NewIFlowAuth (line 50) | func NewIFlowAuth(cfg *config.Config) *IFlowAuth {
type IFlowTokenResponse (line 251) | type IFlowTokenResponse struct
type IFlowTokenData (line 260) | type IFlowTokenData struct
type userInfoResponse (line 272) | type userInfoResponse struct
type userInfoData (line 277) | type userInfoData struct
type iFlowAPIKeyResponse (line 284) | type iFlowAPIKeyResponse struct
type iFlowKeyData (line 293) | type iFlowKeyData struct
type iFlowRefreshRequest (line 302) | type iFlowRefreshRequest struct
function ShouldRefreshAPIKey (line 472) | func ShouldRefreshAPIKey(expireTime string) (bool, time.Duration, error) {
FILE: internal/auth/iflow/iflow_token.go
type IFlowTokenStorage (line 13) | type IFlowTokenStorage struct
method SetMetadata (line 31) | func (ts *IFlowTokenStorage) SetMetadata(meta map[string]any) {
method SaveTokenToFile (line 36) | func (ts *IFlowTokenStorage) SaveTokenToFile(authFilePath string) error {
FILE: internal/auth/iflow/oauth_server.go
constant errorRedirectURL (line 15) | errorRedirectURL = "https://iflow.cn/oauth/error"
type OAuthResult (line 18) | type OAuthResult struct
type OAuthServer (line 25) | type OAuthServer struct
method Start (line 44) | func (s *OAuthServer) Start() error {
method Stop (line 77) | func (s *OAuthServer) Stop(ctx context.Context) error {
method WaitForCallback (line 91) | func (s *OAuthServer) WaitForCallback(timeout time.Duration) (*OAuthRe...
method handleCallback (line 102) | func (s *OAuthServer) handleCallback(w http.ResponseWriter, r *http.Re...
method sendResult (line 127) | func (s *OAuthServer) sendResult(res *OAuthResult) {
method isPortAvailable (line 135) | func (s *OAuthServer) isPortAvailable() bool {
function NewOAuthServer (line 35) | func NewOAuthServer(port int) *OAuthServer {
FILE: internal/auth/kimi/kimi.go
constant kimiClientID (line 25) | kimiClientID = "17e5f671-d194-4dfb-9706-5516cb48c098"
constant kimiOAuthHost (line 27) | kimiOAuthHost = "https://auth.kimi.com"
constant kimiDeviceCodeURL (line 29) | kimiDeviceCodeURL = kimiOAuthHost + "/api/oauth/device_authorization"
constant kimiTokenURL (line 31) | kimiTokenURL = kimiOAuthHost + "/api/oauth/token"
constant KimiAPIBaseURL (line 33) | KimiAPIBaseURL = "https://api.kimi.com/coding"
constant defaultPollInterval (line 35) | defaultPollInterval = 5 * time.Second
constant maxPollDuration (line 37) | maxPollDuration = 15 * time.Minute
constant refreshThresholdSeconds (line 39) | refreshThresholdSeconds = 300
type KimiAuth (line 43) | type KimiAuth struct
method StartDeviceFlow (line 57) | func (k *KimiAuth) StartDeviceFlow(ctx context.Context) (*DeviceCodeRe...
method WaitForAuthorization (line 62) | func (k *KimiAuth) WaitForAuthorization(ctx context.Context, deviceCod...
method CreateTokenStorage (line 75) | func (k *KimiAuth) CreateTokenStorage(bundle *KimiAuthBundle) *KimiTok...
function NewKimiAuth (line 49) | func NewKimiAuth(cfg *config.Config) *KimiAuth {
type DeviceFlowClient (line 92) | type DeviceFlowClient struct
method commonHeaders (line 152) | func (c *DeviceFlowClient) commonHeaders() map[string]string {
method RequestDeviceCode (line 163) | func (c *DeviceFlowClient) RequestDeviceCode(ctx context.Context) (*De...
method PollForToken (line 205) | func (c *DeviceFlowClient) PollForToken(ctx context.Context, deviceCod...
method exchangeDeviceCode (line 249) | func (c *DeviceFlowClient) exchangeDeviceCode(ctx context.Context, dev...
method RefreshToken (line 329) | func (c *DeviceFlowClient) RefreshToken(ctx context.Context, refreshTo...
function NewDeviceFlowClient (line 99) | func NewDeviceFlowClient(cfg *config.Config) *DeviceFlowClient {
function NewDeviceFlowClientWithDeviceID (line 104) | func NewDeviceFlowClientWithDeviceID(cfg *config.Config, deviceID string...
function getOrCreateDeviceID (line 121) | func getOrCreateDeviceID() string {
function getDeviceModel (line 126) | func getDeviceModel() string {
function getHostname (line 143) | func getHostname() string {
FILE: internal/auth/kimi/token.go
type KimiTokenStorage (line 17) | type KimiTokenStorage struct
method SetMetadata (line 39) | func (ts *KimiTokenStorage) SetMetadata(meta map[string]any) {
method SaveTokenToFile (line 82) | func (ts *KimiTokenStorage) SaveTokenToFile(authFilePath string) error {
method IsExpired (line 113) | func (ts *KimiTokenStorage) IsExpired() bool {
method NeedsRefresh (line 126) | func (ts *KimiTokenStorage) NeedsRefresh() bool {
type KimiTokenData (line 44) | type KimiTokenData struct
type KimiAuthBundle (line 58) | type KimiAuthBundle struct
type DeviceCodeResponse (line 66) | type DeviceCodeResponse struct
FILE: internal/auth/models.go
type TokenStorage (line 8) | type TokenStorage interface
FILE: internal/auth/qwen/qwen_auth.go
constant QwenOAuthDeviceCodeEndpoint (line 23) | QwenOAuthDeviceCodeEndpoint = "https://chat.qwen.ai/api/v1/oauth2/device...
constant QwenOAuthTokenEndpoint (line 25) | QwenOAuthTokenEndpoint = "https://chat.qwen.ai/api/v1/oauth2/token"
constant QwenOAuthClientID (line 27) | QwenOAuthClientID = "f0304373b74a44d2b584a3fb70ca9e56"
constant QwenOAuthScope (line 29) | QwenOAuthScope = "openid profile email model.completion"
constant QwenOAuthGrantType (line 31) | QwenOAuthGrantType = "urn:ietf:params:oauth:grant-type:device_code"
type QwenTokenData (line 35) | type QwenTokenData struct
type DeviceFlow (line 48) | type DeviceFlow struct
type QwenTokenResponse (line 67) | type QwenTokenResponse struct
type QwenAuth (line 81) | type QwenAuth struct
method generateCodeVerifier (line 93) | func (qa *QwenAuth) generateCodeVerifier() (string, error) {
method generateCodeChallenge (line 102) | func (qa *QwenAuth) generateCodeChallenge(codeVerifier string) string {
method generatePKCEPair (line 108) | func (qa *QwenAuth) generatePKCEPair() (string, string, error) {
method RefreshTokens (line 118) | func (qa *QwenAuth) RefreshTokens(ctx context.Context, refreshToken st...
method InitiateDeviceFlow (line 170) | func (qa *QwenAuth) InitiateDeviceFlow(ctx context.Context) (*DeviceFl...
method PollForToken (line 227) | func (qa *QwenAuth) PollForToken(deviceCode, codeVerifier string) (*Qw...
method RefreshTokensWithRetry (line 314) | func (o *QwenAuth) RefreshTokensWithRetry(ctx context.Context, refresh...
method CreateTokenStorage (line 340) | func (o *QwenAuth) CreateTokenStorage(tokenData *QwenTokenData) *QwenT...
method UpdateTokenStorage (line 353) | func (o *QwenAuth) UpdateTokenStorage(storage *QwenTokenStorage, token...
function NewQwenAuth (line 86) | func NewQwenAuth(cfg *config.Config) *QwenAuth {
FILE: internal/auth/qwen/qwen_token.go
type QwenTokenStorage (line 18) | type QwenTokenStorage struct
method SetMetadata (line 40) | func (ts *QwenTokenStorage) SetMetadata(meta map[string]any) {
method SaveTokenToFile (line 54) | func (ts *QwenTokenStorage) SaveTokenToFile(authFilePath string) error {
FILE: internal/auth/vertex/keyutil.go
function NormalizeServiceAccountJSON (line 16) | func NormalizeServiceAccountJSON(raw []byte) ([]byte, error) {
function NormalizeServiceAccountMap (line 37) | func NormalizeServiceAccountMap(sa map[string]any) (map[string]any, erro...
function sanitizePrivateKey (line 57) | func sanitizePrivateKey(raw string) (string, error) {
function ensureRSAPrivateKey (line 86) | func ensureRSAPrivateKey(block *pem.Block) (*pem.Block, error) {
function rebuildPEM (line 125) | func rebuildPEM(raw string) (string, error) {
function filterBase64 (line 150) | func filterBase64(s string) string {
function stripANSIEscape (line 169) | func stripANSIEscape(s string) string {
FILE: internal/auth/vertex/vertex_credentials.go
type VertexCredentialStorage (line 18) | type VertexCredentialStorage struct
method SaveTokenToFile (line 37) | func (s *VertexCredentialStorage) SaveTokenToFile(authFilePath string)...
FILE: internal/browser/browser.go
function OpenURL (line 23) | func OpenURL(url string) error {
function openURLPlatformSpecific (line 47) | func openURLPlatformSpecific(url string) error {
function IsAvailable (line 86) | func IsAvailable() bool {
function GetPlatformInfo (line 119) | func GetPlatformInfo() map[string]interface{} {
FILE: internal/cache/signature_cache.go
type SignatureEntry (line 12) | type SignatureEntry struct
constant SignatureCacheTTL (line 19) | SignatureCacheTTL = 3 * time.Hour
constant SignatureTextHashLen (line 22) | SignatureTextHashLen = 16
constant MinValidSignatureLen (line 25) | MinValidSignatureLen = 50
constant CacheCleanupInterval (line 28) | CacheCleanupInterval = 10 * time.Minute
type groupCache (line 38) | type groupCache struct
function hashText (line 44) | func hashText(text string) string {
function getOrCreateGroupCache (line 50) | func getOrCreateGroupCache(groupKey string) *groupCache {
function startCacheCleanup (line 64) | func startCacheCleanup() {
function purgeExpiredCaches (line 75) | func purgeExpiredCaches() {
function CacheSignature (line 98) | func CacheSignature(modelName, text, signature string) {
function GetCachedSignature (line 120) | func GetCachedSignature(modelName, text string) string {
function ClearSignatureCache (line 169) | func ClearSignatureCache(modelName string) {
function HasValidSignature (line 182) | func HasValidSignature(modelName, signature string) bool {
function GetModelGroup (line 186) | func GetModelGroup(modelName string) string {
FILE: internal/cache/signature_cache_test.go
constant testModelName (line 8) | testModelName = "claude-sonnet-4-5"
function TestCacheSignature_BasicStorageAndRetrieval (line 10) | func TestCacheSignature_BasicStorageAndRetrieval(t *testing.T) {
function TestCacheSignature_DifferentModelGroups (line 26) | func TestCacheSignature_DifferentModelGroups(t *testing.T) {
function TestCacheSignature_NotFound (line 45) | func TestCacheSignature_NotFound(t *testing.T) {
function TestCacheSignature_EmptyInputs (line 60) | func TestCacheSignature_EmptyInputs(t *testing.T) {
function TestCacheSignature_ShortSignatureRejected (line 73) | func TestCacheSignature_ShortSignatureRejected(t *testing.T) {
function TestClearSignatureCache_ModelGroup (line 86) | func TestClearSignatureCache_ModelGroup(t *testing.T) {
function TestClearSignatureCache_AllSessions (line 100) | func TestClearSignatureCache_AllSessions(t *testing.T) {
function TestHasValidSignature (line 117) | func TestHasValidSignature(t *testing.T) {
function TestCacheSignature_TextHashCollisionResistance (line 142) | func TestCacheSignature_TextHashCollisionResistance(t *testing.T) {
function TestCacheSignature_UnicodeText (line 162) | func TestCacheSignature_UnicodeText(t *testing.T) {
function TestCacheSignature_Overwrite (line 175) | func TestCacheSignature_Overwrite(t *testing.T) {
function TestCacheSignature_ExpirationLogic (line 192) | func TestCacheSignature_ExpirationLogic(t *testing.T) {
FILE: internal/cmd/anthropic_login.go
function DoClaudeLogin (line 22) | func DoClaudeLogin(cfg *config.Config, options *LoginOptions) {
FILE: internal/cmd/antigravity_login.go
function DoAntigravityLogin (line 13) | func DoAntigravityLogin(cfg *config.Config, options *LoginOptions) {
FILE: internal/cmd/auth_manager.go
function newAuthManager (line 13) | func newAuthManager() *sdkAuth.Manager {
FILE: internal/cmd/iflow_cookie.go
function DoIFlowCookieAuth (line 17) | func DoIFlowCookieAuth(cfg *config.Config, options *LoginOptions) {
function promptForCookie (line 80) | func promptForCookie(promptFn func(string) (string, error)) (string, err...
function getAuthFilePath (line 95) | func getAuthFilePath(cfg *config.Config, provider, email string) string {
FILE: internal/cmd/iflow_login.go
function DoIFlowLogin (line 14) | func DoIFlowLogin(cfg *config.Config, options *LoginOptions) {
FILE: internal/cmd/kimi_login.go
function DoKimiLogin (line 19) | func DoKimiLogin(cfg *config.Config, options *LoginOptions) {
FILE: internal/cmd/login.go
constant geminiCLIEndpoint (line 31) | geminiCLIEndpoint = "https://cloudcode-pa.googleapis.com"
constant geminiCLIVersion (line 32) | geminiCLIVersion = "v1internal"
type projectSelectionRequiredError (line 35) | type projectSelectionRequiredError struct
method Error (line 37) | func (e *projectSelectionRequiredError) Error() string {
function DoLogin (line 49) | func DoLogin(cfg *config.Config, projectID string, options *LoginOptions) {
function performGeminiCLISetup (line 209) | func performGeminiCLISetup(ctx context.Context, httpClient *http.Client,...
function callGeminiCLI (line 390) | func callGeminiCLI(ctx context.Context, httpClient *http.Client, endpoin...
function fetchGCPProjects (line 439) | func fetchGCPProjects(ctx context.Context, httpClient *http.Client) ([]i...
function promptForProjectSelection (line 469) | func promptForProjectSelection(projects []interfaces.GCPProjectProjects,...
function resolveProjectSelections (line 534) | func resolveProjectSelections(selection string, projects []interfaces.GC...
function defaultProjectPrompt (line 580) | func defaultProjectPrompt() func(string) (string, error) {
function showProjectSelectionHelp (line 595) | func showProjectSelectionHelp(email string, projects []interfaces.GCPPro...
function checkCloudAPIIsEnabled (line 616) | func checkCloudAPIIsEnabled(ctx context.Context, httpClient *http.Client...
function updateAuthRecord (line 677) | func updateAuthRecord(record *cliproxyauth.Auth, storage *gemini.GeminiT...
FILE: internal/cmd/openai_device_login.go
constant codexLoginModeMetadataKey (line 16) | codexLoginModeMetadataKey = "codex_login_mode"
constant codexLoginModeDevice (line 17) | codexLoginModeDevice = "device"
function DoCodexDeviceLogin (line 22) | func DoCodexDeviceLogin(cfg *config.Config, options *LoginOptions) {
FILE: internal/cmd/openai_login.go
type LoginOptions (line 18) | type LoginOptions struct
function DoCodexLogin (line 36) | func DoCodexLogin(cfg *config.Config, options *LoginOptions) {
FILE: internal/cmd/qwen_login.go
function DoQwenLogin (line 20) | func DoQwenLogin(cfg *config.Config, options *LoginOptions) {
FILE: internal/cmd/run.go
function StartService (line 27) | func StartService(cfg *config.Config, configPath string, localPassword s...
function StartServiceBackground (line 60) | func StartServiceBackground(cfg *config.Config, configPath string, local...
function WaitForCloudDeploy (line 88) | func WaitForCloudDeploy() {
FILE: internal/cmd/vertex_import.go
function DoVertexImport (line 23) | func DoVertexImport(cfg *config.Config, keyPath string) {
function sanitizeFilePart (line 101) | func sanitizeFilePart(s string) string {
function labelForVertex (line 110) | func labelForVertex(projectID, email string) string {
FILE: internal/config/codex_websocket_header_defaults_test.go
function TestLoadConfigOptional_CodexHeaderDefaults (line 9) | func TestLoadConfigOptional_CodexHeaderDefaults(t *testing.T) {
FILE: internal/config/config.go
constant DefaultPanelGitHubRepository (line 22) | DefaultPanelGitHubRepository = "https://github.com/router-for-me/Cli-Pro...
constant DefaultPprofAddr (line 23) | DefaultPprofAddr = "127.0.0.1:8316"
type Config (line 27) | type Config struct
method SanitizePayloadRules (line 668) | func (cfg *Config) SanitizePayloadRules() {
method SanitizeCodexHeaderDefaults (line 724) | func (cfg *Config) SanitizeCodexHeaderDefaults() {
method SanitizeOAuthModelAlias (line 735) | func (cfg *Config) SanitizeOAuthModelAlias() {
method SanitizeOpenAICompatibility (line 773) | func (cfg *Config) SanitizeOpenAICompatibility() {
method SanitizeCodexKeys (line 795) | func (cfg *Config) SanitizeCodexKeys() {
method SanitizeClaudeKeys (line 815) | func (cfg *Config) SanitizeClaudeKeys() {
method SanitizeGeminiKeys (line 828) | func (cfg *Config) SanitizeGeminiKeys() {
method migrateLegacyGeminiKeys (line 1681) | func (cfg *Config) migrateLegacyGeminiKeys(legacy []string) bool {
method migrateLegacyOpenAICompatibilityKeys (line 1709) | func (cfg *Config) migrateLegacyOpenAICompatibilityKeys(legacy []legac...
method migrateLegacyAmpConfig (line 1785) | func (cfg *Config) migrateLegacyAmpConfig(legacy *legacyConfigData) bo...
type ClaudeHeaderDefaults (line 133) | type ClaudeHeaderDefaults struct
type CodexHeaderDefaults (line 143) | type CodexHeaderDefaults struct
type TLSConfig (line 149) | type TLSConfig struct
type PprofConfig (line 159) | type PprofConfig struct
type RemoteManagement (line 167) | type RemoteManagement struct
type QuotaExceeded (line 181) | type QuotaExceeded struct
type RoutingConfig (line 190) | type RoutingConfig struct
type OAuthModelAlias (line 200) | type OAuthModelAlias struct
type AmpModelMapping (line 209) | type AmpModelMapping struct
type AmpCode (line 225) | type AmpCode struct
type AmpUpstreamAPIKeyEntry (line 255) | type AmpUpstreamAPIKeyEntry struct
type PayloadConfig (line 264) | type PayloadConfig struct
type PayloadFilterRule (line 278) | type PayloadFilterRule struct
type PayloadRule (line 286) | type PayloadRule struct
type PayloadModelRule (line 295) | type PayloadModelRule struct
type CloakConfig (line 304) | type CloakConfig struct
type ClaudeKey (line 327) | type ClaudeKey struct
method GetAPIKey (line 358) | func (k ClaudeKey) GetAPIKey() string { return k.APIKey }
method GetBaseURL (line 359) | func (k ClaudeKey) GetBaseURL() string { return k.BaseURL }
type ClaudeModel (line 362) | type ClaudeModel struct
method GetName (line 370) | func (m ClaudeModel) GetName() string { return m.Name }
method GetAlias (line 371) | func (m ClaudeModel) GetAlias() string { return m.Alias }
type CodexKey (line 375) | type CodexKey struct
method GetAPIKey (line 406) | func (k CodexKey) GetAPIKey() string { return k.APIKey }
method GetBaseURL (line 407) | func (k CodexKey) GetBaseURL() string { return k.BaseURL }
type CodexModel (line 410) | type CodexModel struct
method GetName (line 418) | func (m CodexModel) GetName() string { return m.Name }
method GetAlias (line 419) | func (m CodexModel) GetAlias() string { return m.Alias }
type GeminiKey (line 423) | type GeminiKey struct
method GetAPIKey (line 450) | func (k GeminiKey) GetAPIKey() string { return k.APIKey }
method GetBaseURL (line 451) | func (k GeminiKey) GetBaseURL() string { return k.BaseURL }
type GeminiModel (line 454) | type GeminiModel struct
method GetName (line 462) | func (m GeminiModel) GetName() string { return m.Name }
method GetAlias (line 463) | func (m GeminiModel) GetAlias() string { return m.Alias }
type OpenAICompatibility (line 467) | type OpenAICompatibility struct
type OpenAICompatibilityAPIKey (line 492) | type OpenAICompatibilityAPIKey struct
type OpenAICompatibilityModel (line 502) | type OpenAICompatibilityModel struct
method GetName (line 510) | func (m OpenAICompatibilityModel) GetName() string { return m.Name }
method GetAlias (line 511) | func (m OpenAICompatibilityModel) GetAlias() string { return m.Alias }
function LoadConfig (line 523) | func LoadConfig(configFile string) (*Config, error) {
function LoadConfigOptional (line 530) | func LoadConfigOptional(configFile string, optional bool) (*Config, erro...
function sanitizePayloadRawRules (line 676) | func sanitizePayloadRawRules(rules []PayloadRule, section string) []Payl...
function payloadRawString (line 711) | func payloadRawString(value any) ([]byte, bool) {
function normalizeModelPrefix (line 855) | func normalizeModelPrefix(prefix string) string {
function looksLikeBcrypt (line 868) | func looksLikeBcrypt(s string) bool {
function NormalizeHeaders (line 873) | func NormalizeHeaders(headers map[string]string) map[string]string {
function NormalizeExcludedModels (line 894) | func NormalizeExcludedModels(models []string) []string {
function NormalizeOAuthExcludedModels (line 919) | func NormalizeOAuthExcludedModels(entries map[string][]string) map[strin...
function hashSecret (line 942) | func hashSecret(secret string) (string, error) {
function SaveConfigPreserveComments (line 953) | func SaveConfigPreserveComments(configFile string, cfg *Config) error {
function SaveConfigPreserveCommentsUpdateNestedScalar (line 1024) | func SaveConfigPreserveCommentsUpdateNestedScalar(configFile string, pat...
function NormalizeCommentIndentation (line 1075) | func NormalizeCommentIndentation(data []byte) []byte {
function getOrCreateMapValue (line 1097) | func getOrCreateMapValue(mapNode *yaml.Node, key string) *yaml.Node {
function mergeMappingPreserve (line 1119) | func mergeMappingPreserve(dst, src *yaml.Node, path ...[]string) {
function mergeNodePreserve (line 1158) | func mergeNodePreserve(dst, src *yaml.Node, path ...[]string) {
function findMapKeyIndex (line 1225) | func findMapKeyIndex(mapNode *yaml.Node, key string) int {
function appendPath (line 1238) | func appendPath(path []string, key string) []string {
function isKnownDefaultValue (line 1251) | func isKnownDefaultValue(path []string, node *yaml.Node) bool {
function pruneKnownDefaultsInNewNode (line 1289) | func pruneKnownDefaultsInNewNode(path []string, node *yaml.Node) {
function isZeroValueNode (line 1328) | func isZeroValueNode(node *yaml.Node) bool {
function deepCopyNode (line 1371) | func deepCopyNode(n *yaml.Node) *yaml.Node {
function copyNodeShallow (line 1387) | func copyNodeShallow(dst, src *yaml.Node) {
function reorderSequenceForMerge (line 1405) | func reorderSequenceForMerge(dst, src *yaml.Node) {
function matchSequenceElement (line 1427) | func matchSequenceElement(original []*yaml.Node, used []bool, target *ya...
function sequenceElementIdentity (line 1470) | func sequenceElementIdentity(node *yaml.Node) string {
function mappingScalarValue (line 1494) | func mappingScalarValue(node *yaml.Node, key string) string {
function nodesStructurallyEqual (line 1512) | func nodesStructurallyEqual(a, b *yaml.Node) bool {
function removeMapKey (line 1552) | func removeMapKey(mapNode *yaml.Node, key string) {
function pruneMappingToGeneratedKeys (line 1564) | func pruneMappingToGeneratedKeys(dstRoot, srcRoot *yaml.Node, key string) {
function pruneMissingMapKeys (line 1607) | func pruneMissingMapKeys(dstMap, srcMap *yaml.Node) {
function normalizeCollectionNodeStyles (line 1641) | func normalizeCollectionNodeStyles(node *yaml.Node) {
type legacyConfigData (line 1666) | type legacyConfigData struct
type legacyOpenAICompatibility (line 1675) | type legacyOpenAICompatibility struct
function mergeLegacyOpenAICompatAPIKeys (line 1729) | func mergeLegacyOpenAICompatAPIKeys(entry *OpenAICompatibility, keys []s...
function findOpenAICompatTarget (line 1757) | func findOpenAICompatTarget(entries []OpenAICompatibility, legacyName, l...
function removeLegacyOpenAICompatAPIKeys (line 1813) | func removeLegacyOpenAICompatAPIKeys(root *yaml.Node) {
function removeLegacyAmpKeys (line 1832) | func removeLegacyAmpKeys(root *yaml.Node) {
function removeLegacyGenerativeLanguageKeys (line 1842) | func removeLegacyGenerativeLanguageKeys(root *yaml.Node) {
function removeLegacyAuthBlock (line 1849) | func removeLegacyAuthBlock(root *yaml.Node) {
FILE: internal/config/oauth_model_alias_test.go
function TestSanitizeOAuthModelAlias_PreservesForkFlag (line 5) | func TestSanitizeOAuthModelAlias_PreservesForkFlag(t *testing.T) {
function TestSanitizeOAuthModelAlias_AllowsMultipleAliasesForSameName (line 29) | func TestSanitizeOAuthModelAlias_AllowsMultipleAliasesForSameName(t *tes...
FILE: internal/config/sdk_config.go
type SDKConfig (line 8) | type SDKConfig struct
type StreamingConfig (line 36) | type StreamingConfig struct
FILE: internal/config/vertex_compat.go
type VertexCompatKey (line 11) | type VertexCompatKey struct
method GetAPIKey (line 42) | func (k VertexCompatKey) GetAPIKey() string { return k.APIKey }
method GetBaseURL (line 43) | func (k VertexCompatKey) GetBaseURL() string { return k.BaseURL }
type VertexCompatModel (line 47) | type VertexCompatModel struct
method GetName (line 55) | func (m VertexCompatModel) GetName() string { return m.Name }
method GetAlias (line 56) | func (m VertexCompatModel) GetAlias() string { return m.Alias }
method SanitizeVertexCompatKeys (line 59) | func (cfg *Config) SanitizeVertexCompatKeys() {
FILE: internal/constant/constant.go
constant Gemini (line 8) | Gemini = "gemini"
constant GeminiCLI (line 11) | GeminiCLI = "gemini-cli"
constant Codex (line 14) | Codex = "codex"
constant Claude (line 17) | Claude = "claude"
constant OpenAI (line 20) | OpenAI = "openai"
constant OpenaiResponse (line 23) | OpenaiResponse = "openai-response"
constant Antigravity (line 26) | Antigravity = "antigravity"
FILE: internal/interfaces/api_handler.go
type APIHandler (line 9) | type APIHandler interface
FILE: internal/interfaces/client_models.go
type GCPProject (line 12) | type GCPProject struct
type GCPProjectLabels (line 19) | type GCPProjectLabels struct
type GCPProjectProjects (line 26) | type GCPProjectProjects struct
type Content (line 48) | type Content struct
type Part (line 58) | type Part struct
type InlineData (line 79) | type InlineData struct
type FunctionCall (line 89) | type FunctionCall struct
type FunctionResponse (line 102) | type FunctionResponse struct
type GenerateContentRequest (line 115) | type GenerateContentRequest struct
type GenerationConfig (line 131) | type GenerationConfig struct
type GenerationConfigThinkingConfig (line 150) | type GenerationConfigThinkingConfig struct
type ToolDeclaration (line 158) | type ToolDeclaration struct
FILE: internal/interfaces/error_message.go
type ErrorMessage (line 11) | type ErrorMessage struct
FILE: internal/logging/gin_logger.go
constant skipGinLogKey (line 29) | skipGinLogKey = "__gin_skip_request_logging__"
function GinLogrusLogger (line 40) | func GinLogrusLogger() gin.HandlerFunc {
function isAIAPIPath (line 99) | func isAIAPIPath(path string) bool {
function GinLogrusRecovery (line 114) | func GinLogrusRecovery() gin.HandlerFunc {
function SkipGinRequestLogging (line 133) | func SkipGinRequestLogging(c *gin.Context) {
function shouldSkipGinRequestLogging (line 140) | func shouldSkipGinRequestLogging(c *gin.Context) bool {
FILE: internal/logging/gin_logger_test.go
function TestGinLogrusRecoveryRepanicsErrAbortHandler (line 12) | func TestGinLogrusRecoveryRepanicsErrAbortHandler(t *testing.T) {
function TestGinLogrusRecoveryHandlesRegularPanic (line 44) | func TestGinLogrusRecoveryHandlesRegularPanic(t *testing.T) {
FILE: internal/logging/global_logger.go
type LogFormatter (line 30) | type LogFormatter struct
method Format (line 36) | func (m *LogFormatter) Format(entry *log.Entry) ([]byte, error) {
function SetupBaseLogger (line 85) | func SetupBaseLogger() {
function isDirWritable (line 105) | func isDirWritable(dir string) bool {
function ResolveLogDirectory (line 125) | func ResolveLogDirectory(cfg *config.Config) string {
function ConfigureLogOutput (line 148) | func ConfigureLogOutput(cfg *config.Config) error {
function closeLogOutputs (line 185) | func closeLogOutputs() {
FILE: internal/logging/log_dir_cleaner.go
constant logDirCleanerInterval (line 14) | logDirCleanerInterval = time.Minute
function configureLogDirCleanerLocked (line 18) | func configureLogDirCleanerLocked(logDir string, maxTotalSizeMB int, pro...
function stopLogDirCleanerLocked (line 40) | func stopLogDirCleanerLocked() {
function runLogDirCleaner (line 48) | func runLogDirCleaner(ctx context.Context, logDir string, maxBytes int64...
function enforceLogDirSizeLimit (line 74) | func enforceLogDirSizeLimit(logDir string, maxBytes int64, protectedPath...
function isLogFileName (line 159) | func isLogFileName(name string) bool {
FILE: internal/logging/log_dir_cleaner_test.go
function TestEnforceLogDirSizeLimitDeletesOldest (line 10) | func TestEnforceLogDirSizeLimitDeletesOldest(t *testing.T) {
function TestEnforceLogDirSizeLimitSkipsProtected (line 37) | func TestEnforceLogDirSizeLimitSkipsProtected(t *testing.T) {
function writeLogFile (line 60) | func writeLogFile(t *testing.T, path string, size int, modTime time.Time) {
FILE: internal/logging/request_logger.go
type RequestLogger (line 33) | type RequestLogger interface
type StreamingLogWriter (line 77) | type StreamingLogWriter interface
type FileRequestLogger (line 129) | type FileRequestLogger struct
method IsEnabled (line 170) | func (l *FileRequestLogger) IsEnabled() bool {
method SetEnabled (line 179) | func (l *FileRequestLogger) SetEnabled(enabled bool) {
method SetErrorLogsMaxFiles (line 184) | func (l *FileRequestLogger) SetErrorLogsMaxFiles(maxFiles int) {
method LogRequest (line 206) | func (l *FileRequestLogger) LogRequest(url, method string, requestHead...
method LogRequestWithOptions (line 212) | func (l *FileRequestLogger) LogRequestWithOptions(url, method string, ...
method logRequest (line 216) | func (l *FileRequestLogger) logRequest(url, method string, requestHead...
method LogStreamingRequest (line 304) | func (l *FileRequestLogger) LogStreamingRequest(url, method string, he...
method generateErrorFilename (line 359) | func (l *FileRequestLogger) generateErrorFilename(url string, requestI...
method ensureLogsDir (line 367) | func (l *FileRequestLogger) ensureLogsDir() error {
method generateFilename (line 383) | func (l *FileRequestLogger) generateFilename(url string, requestID ......
method sanitizeForFilename (line 420) | func (l *FileRequestLogger) sanitizeForFilename(path string) string {
method cleanupOldErrorLogs (line 447) | func (l *FileRequestLogger) cleanupOldErrorLogs() error {
method writeRequestBodyTempFile (line 496) | func (l *FileRequestLogger) writeRequestBodyTempFile(body []byte) (str...
method writeNonStreamingLog (line 515) | func (l *FileRequestLogger) writeNonStreamingLog(
method formatLogContent (line 735) | func (l *FileRequestLogger) formatLogContent(url, method string, heade...
method decompressResponse (line 804) | func (l *FileRequestLogger) decompressResponse(responseHeaders map[str...
method decompressGzip (line 841) | func (l *FileRequestLogger) decompressGzip(data []byte) ([]byte, error) {
method decompressDeflate (line 868) | func (l *FileRequestLogger) decompressDeflate(data []byte) ([]byte, er...
method decompressBrotli (line 892) | func (l *FileRequestLogger) decompressBrotli(data []byte) ([]byte, err...
method decompressZstd (line 911) | func (l *FileRequestLogger) decompressZstd(data []byte) ([]byte, error) {
method formatRequestInfo (line 936) | func (l *FileRequestLogger) formatRequestInfo(url, method string, head...
function NewFileRequestLogger (line 151) | func NewFileRequestLogger(enabled bool, logsDir string, configDir string...
function writeRequestInfoWithBody (line 549) | func writeRequestInfoWithBody(
function writeAPISection (line 617) | func writeAPISection(w io.Writer, sectionHeader string, sectionPrefix st...
function writeAPIErrorResponses (line 654) | func writeAPIErrorResponses(w io.Writer, apiResponseErrors []*interfaces...
function writeResponseSection (line 677) | func writeResponseSection(w io.Writer, statusCode int, statusWritten boo...
type FileStreamingLogWriter (line 965) | type FileStreamingLogWriter struct
method WriteChunkAsync (line 1022) | func (w *FileStreamingLogWriter) WriteChunkAsync(chunk []byte) {
method WriteStatus (line 1047) | func (w *FileStreamingLogWriter) WriteStatus(status int, headers map[s...
method WriteAPIRequest (line 1072) | func (w *FileStreamingLogWriter) WriteAPIRequest(apiRequest []byte) er...
method WriteAPIResponse (line 1087) | func (w *FileStreamingLogWriter) WriteAPIResponse(apiResponse []byte) ...
method SetFirstChunkTimestamp (line 1095) | func (w *FileStreamingLogWriter) SetFirstChunkTimestamp(timestamp time...
method Close (line 1107) | func (w *FileStreamingLogWriter) Close() error {
method asyncWriter (line 1150) | func (w *FileStreamingLogWriter) asyncWriter() {
method writeFinalLog (line 1184) | func (w *FileStreamingLogWriter) writeFinalLog(logFile *os.File) error {
method cleanupTempFiles (line 1208) | func (w *FileStreamingLogWriter) cleanupTempFiles() {
type NoOpStreamingLogWriter (line 1226) | type NoOpStreamingLogWriter struct
method WriteChunkAsync (line 1232) | func (w *NoOpStreamingLogWriter) WriteChunkAsync(_ []byte) {}
method WriteStatus (line 1242) | func (w *NoOpStreamingLogWriter) WriteStatus(_ int, _ map[string][]str...
method WriteAPIRequest (line 1253) | func (w *NoOpStreamingLogWriter) WriteAPIRequest(_ []byte) error {
method WriteAPIResponse (line 1264) | func (w *NoOpStreamingLogWriter) WriteAPIResponse(_ []byte) error {
method SetFirstChunkTimestamp (line 1268) | func (w *NoOpStreamingLogWriter) SetFirstChunkTimestamp(_ time.Time) {}
method Close (line 1274) | func (w *NoOpStreamingLogWriter) Close() error { return nil }
FILE: internal/logging/requestid.go
type requestIDKey (line 12) | type requestIDKey struct
constant ginRequestIDKey (line 15) | ginRequestIDKey = "__request_id__"
function GenerateRequestID (line 18) | func GenerateRequestID() string {
function WithRequestID (line 27) | func WithRequestID(ctx context.Context, requestID string) context.Context {
function GetRequestID (line 33) | func GetRequestID(ctx context.Context) string {
function SetGinRequestID (line 44) | func SetGinRequestID(c *gin.Context, requestID string) {
function GetGinRequestID (line 51) | func GetGinRequestID(c *gin.Context) string {
FILE: internal/managementasset/updater.go
constant defaultManagementReleaseURL (line 28) | defaultManagementReleaseURL = "https://api.github.com/repos/router-for-...
constant defaultManagementFallbackURL (line 29) | defaultManagementFallbackURL = "https://cpamc.router-for.me/"
constant managementAssetName (line 30) | managementAssetName = "management.html"
constant httpUserAgent (line 31) | httpUserAgent = "CLIProxyAPI-management-updater"
constant managementSyncMinInterval (line 32) | managementSyncMinInterval = 30 * time.Second
constant updateCheckInterval (line 33) | updateCheckInterval = 3 * time.Hour
constant ManagementFileName (line 37) | ManagementFileName = managementAssetName
function SetCurrentConfig (line 49) | func SetCurrentConfig(cfg *config.Config) {
function StartAutoUpdater (line 59) | func StartAutoUpdater(ctx context.Context, configFilePath string) {
function runAutoUpdater (line 73) | func runAutoUpdater(ctx context.Context) {
function newHTTPClient (line 109) | func newHTTPClient(proxyURL string) *http.Client {
type releaseAsset (line 118) | type releaseAsset struct
type releaseResponse (line 124) | type releaseResponse struct
function StaticDir (line 129) | func StaticDir(configFilePath string) string {
function FilePath (line 159) | func FilePath(configFilePath string) string {
function EnsureLatestManagementHTML (line 177) | func EnsureLatestManagementHTML(ctx context.Context, staticDir string, p...
function ensureFallbackManagementHTML (line 278) | func ensureFallbackManagementHTML(ctx context.Context, client *http.Clie...
function resolveReleaseURL (line 294) | func resolveReleaseURL(repo string) string {
function fetchLatestAsset (line 326) | func fetchLatestAsset(ctx context.Context, client *http.Client, releaseU...
function downloadAsset (line 371) | func downloadAsset(ctx context.Context, client *http.Client, downloadURL...
function fileSHA256 (line 404) | func fileSHA256(path string) (string, error) {
function atomicWriteFile (line 421) | func atomicWriteFile(path string, data []byte) error {
function parseDigest (line 452) | func parseDigest(digest string) string {
FILE: internal/misc/copy-example-config.go
function CopyConfigTemplate (line 11) | func CopyConfigTemplate(src, dst string) error {
FILE: internal/misc/credentials.go
function LogSavingCredentials (line 16) | func LogSavingCredentials(path string) {
function LogCredentialSeparator (line 25) | func LogCredentialSeparator() {
function MergeMetadata (line 30) | func MergeMetadata(source any, metadata map[string]any) (map[string]any,...
FILE: internal/misc/header_utils.go
constant GeminiCLIVersion (line 15) | GeminiCLIVersion = "0.31.0"
constant GeminiCLIApiClientHeader (line 18) | GeminiCLIApiClientHeader = "google-genai-sdk/1.41.0 gl-node/v22.19.0"
function geminiCLIOS (line 22) | func geminiCLIOS() string {
function geminiCLIArch (line 32) | func geminiCLIArch() string {
function GeminiCLIUserAgent (line 45) | func GeminiCLIUserAgent(model string) string {
function ScrubProxyAndFingerprintHeaders (line 57) | func ScrubProxyAndFingerprintHeaders(req *http.Request) {
function EnsureHeader (line 109) | func EnsureHeader(target http.Header, source http.Header, key, defaultVa...
FILE: internal/misc/oauth.go
function GenerateRandomState (line 17) | func GenerateRandomState() (string, error) {
type OAuthCallback (line 26) | type OAuthCallback struct
function ParseOAuthCallback (line 35) | func ParseOAuthCallback(input string) (*OAuthCallback, error) {
FILE: internal/registry/model_definitions.go
type staticModelsJSON (line 10) | type staticModelsJSON struct
function GetClaudeModels (line 27) | func GetClaudeModels() []*ModelInfo {
function GetGeminiModels (line 32) | func GetGeminiModels() []*ModelInfo {
function GetGeminiVertexModels (line 37) | func GetGeminiVertexModels() []*ModelInfo {
function GetGeminiCLIModels (line 42) | func GetGeminiCLIModels() []*ModelInfo {
function GetAIStudioModels (line 47) | func GetAIStudioModels() []*ModelInfo {
function GetCodexFreeModels (line 52) | func GetCodexFreeModels() []*ModelInfo {
function GetCodexTeamModels (line 57) | func GetCodexTeamModels() []*ModelInfo {
function GetCodexPlusModels (line 62) | func GetCodexPlusModels() []*ModelInfo {
function GetCodexProModels (line 67) | func GetCodexProModels() []*ModelInfo {
function GetQwenModels (line 72) | func GetQwenModels() []*ModelInfo {
function GetIFlowModels (line 77) | func GetIFlowModels() []*ModelInfo {
function GetKimiModels (line 82) | func GetKimiModels() []*ModelInfo {
function GetAntigravityModels (line 87) | func GetAntigravityModels() []*ModelInfo {
function cloneModelInfos (line 92) | func cloneModelInfos(models []*ModelInfo) []*ModelInfo {
function GetStaticModelDefinitionsByChannel (line 117) | func GetStaticModelDefinitionsByChannel(channel string) []*ModelInfo {
function LookupStaticModelInfo (line 147) | func LookupStaticModelInfo(modelID string) *ModelInfo {
FILE: internal/registry/model_registry.go
type ModelInfo (line 19) | type ModelInfo struct
type availableModelsCacheEntry (line 65) | type availableModelsCacheEntry struct
type ThinkingSupport (line 72) | type ThinkingSupport struct
type ModelRegistration (line 87) | type ModelRegistration struct
type ModelRegistryHook (line 106) | type ModelRegistryHook interface
type ModelRegistry (line 112) | type ModelRegistry struct
method ensureAvailableModelsCacheLocked (line 148) | func (r *ModelRegistry) ensureAvailableModelsCacheLocked() {
method invalidateAvailableModelsCacheLocked (line 154) | func (r *ModelRegistry) invalidateAvailableModelsCacheLocked() {
method SetHook (line 180) | func (r *ModelRegistry) SetHook(hook ModelRegistryHook) {
method triggerModelsRegistered (line 192) | func (r *ModelRegistry) triggerModelsRegistered(provider, clientID str...
method triggerModelsUnregistered (line 210) | func (r *ModelRegistry) triggerModelsUnregistered(provider, clientID s...
method RegisterClient (line 232) | func (r *ModelRegistry) RegisterClient(clientID, clientProvider string...
method addModelRegistration (line 447) | func (r *ModelRegistry) addModelRegistration(modelID, provider string,...
method removeModelRegistration (line 488) | func (r *ModelRegistry) removeModelRegistration(clientID, modelID, pro...
method UnregisterClient (line 572) | func (r *ModelRegistry) UnregisterClient(clientID string) {
method unregisterClientInternal (line 580) | func (r *ModelRegistry) unregisterClientInternal(clientID string) {
method SetModelQuotaExceeded (line 640) | func (r *ModelRegistry) SetModelQuotaExceeded(clientID, modelID string) {
method ClearModelQuotaExceeded (line 657) | func (r *ModelRegistry) ClearModelQuotaExceeded(clientID, modelID stri...
method SuspendClientModel (line 674) | func (r *ModelRegistry) SuspendClientModel(clientID, modelID, reason s...
method ResumeClientModel (line 706) | func (r *ModelRegistry) ResumeClientModel(clientID, modelID string) {
method ClientSupportsModel (line 728) | func (r *ModelRegistry) ClientSupportsModel(clientID, modelID string) ...
method GetAvailableModels (line 758) | func (r *ModelRegistry) GetAvailableModels(handlerType string) []map[s...
method buildAvailableModelsLocked (line 786) | func (r *ModelRegistry) buildAvailableModelsLocked(handlerType string,...
method GetAvailableModelsByProvider (line 878) | func (r *ModelRegistry) GetAvailableModelsByProvider(provider string) ...
method GetModelCount (line 1002) | func (r *ModelRegistry) GetModelCount(modelID string) int {
method GetModelProviders (line 1035) | func (r *ModelRegistry) GetModelProviders(modelID string) []string {
method GetModelInfo (line 1087) | func (r *ModelRegistry) GetModelInfo(modelID, provider string) *ModelI...
method convertModelToMap (line 1108) | func (r *ModelRegistry) convertModelToMap(model *ModelInfo, handlerTyp...
method CleanupExpiredQuotas (line 1216) | func (r *ModelRegistry) CleanupExpiredQuotas() {
method GetFirstAvailableModel (line 1247) | func (r *ModelRegistry) GetFirstAvailableModel(handlerType string) (st...
method GetModelsForClient (line 1284) | func (r *ModelRegistry) GetModelsForClient(clientID string) []*ModelIn...
function GetGlobalRegistry (line 135) | func GetGlobalRegistry() *ModelRegistry {
function LookupModelInfo (line 162) | func LookupModelInfo(modelID string, provider ...string) *ModelInfo {
constant defaultModelRegistryHookTimeout (line 189) | defaultModelRegistryHookTimeout = 5 * time.Second
constant modelQuotaExceededWindow (line 190) | modelQuotaExceededWindow = 5 * time.Minute
function cloneModelInfo (line 523) | func cloneModelInfo(model *ModelInfo) *ModelInfo {
function cloneModelInfosUnique (line 550) | func cloneModelInfosUnique(models []*ModelInfo) []*ModelInfo {
function cloneModelMaps (line 835) | func cloneModelMaps(models []map[string]any) []map[string]any {
function cloneModelMapValue (line 851) | func cloneModelMapValue(value any) any {
FILE: internal/registry/model_registry_cache_test.go
function TestGetAvailableModelsReturnsClonedSnapshots (line 5) | func TestGetAvailableModelsReturnsClonedSnapshots(t *testing.T) {
function TestGetAvailableModelsInvalidatesCacheOnRegistryChanges (line 25) | func TestGetAvailableModelsInvalidatesCacheOnRegistryChanges(t *testing....
FILE: internal/registry/model_registry_hook_test.go
function newTestModelRegistry (line 10) | func newTestModelRegistry() *ModelRegistry {
type registeredCall (line 20) | type registeredCall struct
type unregisteredCall (line 26) | type unregisteredCall struct
type capturingHook (line 31) | type capturingHook struct
method OnModelsRegistered (line 36) | func (h *capturingHook) OnModelsRegistered(ctx context.Context, provid...
method OnModelsUnregistered (line 40) | func (h *capturingHook) OnModelsUnregistered(ctx context.Context, prov...
function TestModelRegistryHook_OnModelsRegisteredCalled (line 44) | func TestModelRegistryHook_OnModelsRegisteredCalled(t *testing.T) {
function TestModelRegistryHook_OnModelsUnregisteredCalled (line 80) | func TestModelRegistryHook_OnModelsUnregisteredCalled(t *testing.T) {
type blockingHook (line 110) | type blockingHook struct
method OnModelsRegistered (line 115) | func (h *blockingHook) OnModelsRegistered(ctx context.Context, provide...
method OnModelsUnregistered (line 124) | func (h *blockingHook) OnModelsUnregistered(ctx context.Context, provi...
function TestModelRegistryHook_DoesNotBlockRegisterClient (line 126) | func TestModelRegistryHook_DoesNotBlockRegisterClient(t *testing.T) {
type panicHook (line 158) | type panicHook struct
method OnModelsRegistered (line 163) | func (h *panicHook) OnModelsRegistered(ctx context.Context, provider, ...
method OnModelsUnregistered (line 170) | func (h *panicHook) OnModelsUnregistered(ctx context.Context, provider...
function TestModelRegistryHook_PanicDoesNotAffectRegistry (line 177) | func TestModelRegistryHook_PanicDoesNotAffectRegistry(t *testing.T) {
FILE: internal/registry/model_registry_safety_test.go
function TestGetModelInfoReturnsClone (line 8) | func TestGetModelInfoReturnsClone(t *testing.T) {
function TestGetModelsForClientReturnsClones (line 32) | func TestGetModelsForClientReturnsClones(t *testing.T) {
function TestGetAvailableModelsByProviderReturnsClones (line 59) | func TestGetAvailableModelsByProviderReturnsClones(t *testing.T) {
function TestCleanupExpiredQuotasInvalidatesAvailableModelsCache (line 86) | func TestCleanupExpiredQuotasInvalidatesAvailableModelsCache(t *testing....
function TestGetAvailableModelsReturnsClonedSupportedParameters (line 113) | func TestGetAvailableModelsReturnsClonedSupportedParameters(t *testing.T) {
function TestLookupModelInfoReturnsCloneForStaticDefinitions (line 138) | func TestLookupModelInfoReturnsCloneForStaticDefinitions(t *testing.T) {
FILE: internal/registry/model_updater.go
constant modelsFetchTimeout (line 18) | modelsFetchTimeout = 30 * time.Second
constant modelsRefreshInterval (line 19) | modelsRefreshInterval = 3 * time.Hour
type modelStore (line 30) | type modelStore struct
type ModelRefreshCallback (line 41) | type ModelRefreshCallback
function SetModelRefreshCallback (line 52) | func SetModelRefreshCallback(cb ModelRefreshCallback) {
function init (line 67) | func init() {
function StartModelsUpdater (line 77) | func StartModelsUpdater(ctx context.Context) {
function runModelsUpdater (line 83) | func runModelsUpdater(ctx context.Context) {
function periodicRefresh (line 88) | func periodicRefresh(ctx context.Context) {
function tryPeriodicRefresh (line 104) | func tryPeriodicRefresh(ctx context.Context) {
function tryStartupRefresh (line 111) | func tryStartupRefresh(ctx context.Context) {
function tryRefreshModels (line 115) | func tryRefreshModels(ctx context.Context, label string) {
function fetchModelsFromRemote (line 143) | func fetchModelsFromRemote(ctx context.Context) (*staticModelsJSON, stri...
function detectChangedProviders (line 195) | func detectChangedProviders(oldData, newData *staticModelsJSON) []string {
function modelSectionChanged (line 237) | func modelSectionChanged(a, b []*ModelInfo) bool {
function notifyModelRefresh (line 252) | func notifyModelRefresh(changedProviders []string) {
function mergeProviderNames (line 268) | func mergeProviderNames(existing, incoming []string) []string {
function loadModelsFromBytes (line 299) | func loadModelsFromBytes(data []byte, source string) error {
function getModels (line 314) | func getModels() *staticModelsJSON {
function validateModelsCatalog (line 320) | func validateModelsCatalog(data *staticModelsJSON) error {
function validateModelSection (line 352) | func validateModelSection(section string, models []*ModelInfo) error {
FILE: internal/runtime/executor/aistudio_executor.go
type AIStudioExecutor (line 27) | type AIStudioExecutor struct
method Identifier (line 47) | func (e *AIStudioExecutor) Identifier() string { return "aistudio" }
method PrepareRequest (line 50) | func (e *AIStudioExecutor) PrepareRequest(_ *http.Request, _ *cliproxy...
method HttpRequest (line 55) | func (e *AIStudioExecutor) HttpRequest(ctx context.Context, auth *clip...
method Execute (line 113) | func (e *AIStudioExecutor) Execute(ctx context.Context, auth *cliproxy...
method ExecuteStream (line 172) | func (e *AIStudioExecutor) ExecuteStream(ctx context.Context, auth *cl...
method CountTokens (line 324) | func (e *AIStudioExecutor) CountTokens(ctx context.Context, auth *clip...
method Refresh (line 380) | func (e *AIStudioExecutor) Refresh(_ context.Context, auth *cliproxyau...
method translateRequest (line 390) | func (e *AIStudioExecutor) translateRequest(req cliproxyexecutor.Reque...
method buildEndpoint (line 426) | func (e *AIStudioExecutor) buildEndpoint(model, action, alt string) st...
function NewAIStudioExecutor (line 42) | func NewAIStudioExecutor(cfg *config.Config, provider string, relay *wsr...
type translatedPayload (line 384) | type translatedPayload struct
function ensureColonSpacedJSON (line 442) | func ensureColonSpacedJSON(payload []byte) []byte {
FILE: internal/runtime/executor/antigravity_executor.go
constant antigravityBaseURLDaily (line 39) | antigravityBaseURLDaily = "https://daily-cloudcode-pa.googleapis....
constant antigravitySandboxBaseURLDaily (line 40) | antigravitySandboxBaseURLDaily = "https://daily-cloudcode-pa.sandbox.goo...
constant antigravityBaseURLProd (line 41) | antigravityBaseURLProd = "https://cloudcode-pa.googleapis.com"
constant antigravityCountTokensPath (line 42) | antigravityCountTokensPath = "/v1internal:countTokens"
constant antigravityStreamPath (line 43) | antigravityStreamPath = "/v1internal:streamGenerateContent"
constant antigravityGeneratePath (line 44) | antigravityGeneratePath = "/v1internal:generateContent"
constant antigravityClientID (line 45) | antigravityClientID = "1071006060591-tmhssin2h21lcre235vtoloj...
constant antigravityClientSecret (line 46) | antigravityClientSecret = "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"
constant defaultAntigravityAgent (line 47) | defaultAntigravityAgent = "antigravity/1.19.6 darwin/arm64"
constant antigravityAuthType (line 48) | antigravityAuthType = "antigravity"
constant refreshSkew (line 49) | refreshSkew = 3000 * time.Second
type AntigravityExecutor (line 59) | type AntigravityExecutor struct
method Identifier (line 131) | func (e *AntigravityExecutor) Identifier() string { return antigravity...
method PrepareRequest (line 134) | func (e *AntigravityExecutor) PrepareRequest(req *http.Request, auth *...
method HttpRequest (line 152) | func (e *AntigravityExecutor) HttpRequest(ctx context.Context, auth *c...
method Execute (line 187) | func (e *AntigravityExecutor) Execute(ctx context.Context, auth *clipr...
method executeClaudeNonStream (line 337) | func (e *AntigravityExecutor) executeClaudeNonStream(ctx context.Conte...
method convertStreamToNonStream (line 541) | func (e *AntigravityExecutor) convertStreamToNonStream(stream []byte) ...
method ExecuteStream (line 724) | func (e *AntigravityExecutor) ExecuteStream(ctx context.Context, auth ...
method Refresh (line 922) | func (e *AntigravityExecutor) Refresh(ctx context.Context, auth *clipr...
method CountTokens (line 934) | func (e *AntigravityExecutor) CountTokens(ctx context.Context, auth *c...
method ensureAccessToken (line 1081) | func (e *AntigravityExecutor) ensureAccessToken(ctx context.Context, a...
method refreshToken (line 1103) | func (e *AntigravityExecutor) refreshToken(ctx context.Context, auth *...
method ensureAntigravityProjectID (line 1181) | func (e *AntigravityExecutor) ensureAntigravityProjectID(ctx context.C...
method buildRequest (line 1214) | func (e *AntigravityExecutor) buildRequest(ctx context.Context, auth *...
function NewAntigravityExecutor (line 70) | func NewAntigravityExecutor(cfg *config.Config) *AntigravityExecutor {
function cloneTransportWithHTTP11 (line 82) | func cloneTransportWithHTTP11(base *http.Transport) *http.Transport {
function initAntigravityTransport (line 102) | func initAntigravityTransport() {
function newAntigravityHTTPClient (line 113) | func newAntigravityHTTPClient(ctx context.Context, cfg *config.Config, a...
function tokenExpiry (line 1322) | func tokenExpiry(metadata map[string]any) time.Time {
function metaStringValue (line 1342) | func metaStringValue(metadata map[string]any, key string) string {
function int64Value (line 1357) | func int64Value(value any) (int64, bool) {
function buildBaseURL (line 1380) | func buildBaseURL(auth *cliproxyauth.Auth) string {
function resolveHost (line 1387) | func resolveHost(base string) string {
function resolveUserAgent (line 1398) | func resolveUserAgent(auth *cliproxyauth.Auth) string {
function antigravityRetryAttempts (line 1414) | func antigravityRetryAttempts(auth *cliproxyauth.Auth, cfg *config.Confi...
function antigravityShouldRetryNoCapacity (line 1434) | func antigravityShouldRetryNoCapacity(statusCode int, body []byte) bool {
function antigravityNoCapacityRetryDelay (line 1445) | func antigravityNoCapacityRetryDelay(attempt int) time.Duration {
function antigravityWait (line 1456) | func antigravityWait(ctx context.Context, wait time.Duration) error {
function antigravityBaseURLFallbackOrder (line 1470) | func antigravityBaseURLFallbackOrder(auth *cliproxyauth.Auth) []string {
function resolveCustomAntigravityBaseURL (line 1481) | func resolveCustomAntigravityBaseURL(auth *cliproxyauth.Auth) string {
function geminiToAntigravity (line 1501) | func geminiToAntigravity(modelName string, payload []byte, projectID str...
function generateRequestID (line 1537) | func generateRequestID() string {
function generateImageGenRequestID (line 1541) | func generateImageGenRequestID() string {
function generateSessionID (line 1545) | func generateSessionID() string {
function generateStableSessionID (line 1552) | func generateStableSessionID(payload []byte) string {
function generateProjectID (line 1569) | func generateProjectID() string {
FILE: internal/runtime/executor/antigravity_executor_buildrequest_test.go
function TestAntigravityBuildRequest_SanitizesGeminiToolSchema (line 12) | func TestAntigravityBuildRequest_SanitizesGeminiToolSchema(t *testing.T) {
function TestAntigravityBuildRequest_SanitizesAntigravityToolSchema (line 27) | func TestAntigravityBuildRequest_SanitizesAntigravityToolSchema(t *testi...
function buildRequestBodyFromPayload (line 38) | func buildRequestBodyFromPayload(t *testing.T, modelName string) map[str...
function extractFirstFunctionDeclaration (line 97) | func extractFirstFunctionDeclaration(t *testing.T, body map[string]any) ...
function assertSchemaSanitizedAndPropertyPreserved (line 123) | func assertSchemaSanitizedAndPropertyPreserved(t *testing.T, params map[...
FILE: internal/runtime/executor/cache_helpers.go
type codexCache (line 8) | type codexCache struct
constant codexCacheCleanupInterval (line 21) | codexCacheCleanupInterval = 15 * time.Minute
function startCodexCacheCleanup (line 28) | func startCodexCacheCleanup() {
function purgeExpiredCodexCache (line 39) | func purgeExpiredCodexCache() {
function getCodexCache (line 51) | func getCodexCache(key string) (codexCache, bool) {
function setCodexCache (line 63) | func setCodexCache(key string, cache codexCache) {
FILE: internal/runtime/executor/caching_verify_test.go
function TestEnsureCacheControl (line 10) | func TestEnsureCacheControl(t *testing.T) {
function TestCacheControlOrder (line 219) | func TestCacheControlOrder(t *testing.T) {
FILE: internal/runtime/executor/claude_executor.go
type ClaudeExecutor (line 40) | type ClaudeExecutor struct
method Identifier (line 50) | func (e *ClaudeExecutor) Identifier() string { return "claude" }
method PrepareRequest (line 53) | func (e *ClaudeExecutor) PrepareRequest(req *http.Request, auth *clipr...
method HttpRequest (line 79) | func (e *ClaudeExecutor) HttpRequest(ctx context.Context, auth *clipro...
method Execute (line 94) | func (e *ClaudeExecutor) Execute(ctx context.Context, auth *cliproxyau...
method ExecuteStream (line 262) | func (e *ClaudeExecutor) ExecuteStream(ctx context.Context, auth *clip...
method CountTokens (line 458) | func (e *ClaudeExecutor) CountTokens(ctx context.Context, auth *clipro...
method Refresh (line 567) | func (e *ClaudeExecutor) Refresh(ctx context.Context, auth *cliproxyau...
constant claudeToolPrefix (line 46) | claudeToolPrefix = ""
function NewClaudeExecutor (line 48) | func NewClaudeExecutor(cfg *config.Config) *ClaudeExecutor { return &Cla...
function extractAndRemoveBetas (line 603) | func extractAndRemoveBetas(body []byte) ([]string, []byte) {
function disableThinkingIfToolChoiceForced (line 625) | func disableThinkingIfToolChoiceForced(body []byte) []byte {
type compositeReadCloser (line 641) | type compositeReadCloser struct
method Close (line 646) | func (c *compositeReadCloser) Close() error {
type peekableBody (line 661) | type peekableBody struct
method Close (line 666) | func (p *peekableBody) Close() error {
function decodeResponseBody (line 670) | func decodeResponseBody(body io.ReadCloser, contentEncoding string) (io....
function mapStainlessOS (line 771) | func mapStainlessOS() string {
function mapStainlessArch (line 787) | func mapStainlessArch() string {
function applyClaudeHeaders (line 800) | func applyClaudeHeaders(r *http.Request, auth *cliproxyauth.Auth, apiKey...
function claudeCreds (line 915) | func claudeCreds(a *cliproxyauth.Auth) (apiKey, baseURL string) {
function checkSystemInstructions (line 931) | func checkSystemInstructions(payload []byte) []byte {
function isClaudeOAuthToken (line 935) | func isClaudeOAuthToken(apiKey string) bool {
function applyClaudeToolPrefix (line 939) | func applyClaudeToolPrefix(body []byte, prefix string) []byte {
function stripClaudeToolPrefixFromResponse (line 1026) | func stripClaudeToolPrefixFromResponse(body []byte, prefix string) []byte {
function stripClaudeToolPrefixFromStreamLine (line 1072) | func stripClaudeToolPrefixFromStreamLine(line []byte, prefix string) []b...
function getClientUserAgent (line 1120) | func getClientUserAgent(ctx context.Context) string {
function getCloakConfigFromAuth (line 1129) | func getCloakConfigFromAuth(auth *cliproxyauth.Auth) (string, bool, []st...
function resolveClaudeKeyCloakConfig (line 1155) | func resolveClaudeKeyCloakConfig(cfg *config.Config, auth *cliproxyauth....
function injectFakeUserID (line 1185) | func injectFakeUserID(payload []byte, apiKey string, useCache bool) []by...
function generateBillingHeader (line 1209) | func generateBillingHeader(payload []byte) string {
function checkSystemInstructionsWithMode (line 1228) | func checkSystemInstructionsWithMode(payload []byte, strictMode bool) []...
function applyCloaking (line 1282) | func applyCloaking(ctx context.Context, cfg *config.Config, auth *clipro...
function ensureCacheControl (line 1353) | func ensureCacheControl(payload []byte) []byte {
function countCacheControls (line 1369) | func countCacheControls(payload []byte) int {
function parsePayloadObject (line 1414) | func parsePayloadObject(payload []byte) (map[string]any, bool) {
function marshalPayloadObject (line 1425) | func marshalPayloadObject(original []byte, root map[string]any) []byte {
function asObject (line 1436) | func asObject(v any) (map[string]any, bool) {
function asArray (line 1441) | func asArray(v any) ([]any, bool) {
function countCacheControlsMap (line 1446) | func countCacheControlsMap(root map[string]any) int {
function normalizeTTLForBlock (line 1492) | func normalizeTTLForBlock(obj map[string]any, seen5m *bool) bool {
function findLastCacheControlIndex (line 1515) | func findLastCacheControlIndex(arr []any) int {
function stripCacheControlExceptIndex (line 1529) | func stripCacheControlExceptIndex(arr []any, preserveIdx int, excess *in...
function stripAllCacheControl (line 1545) | func stripAllCacheControl(arr []any, excess *int) {
function stripMessageCacheControl (line 1561) | func stripMessageCacheControl(messages []any, excess *int) {
function normalizeCacheControlTTL (line 1601) | func normalizeCacheControlTTL(payload []byte) []byte {
function enforceCacheControlLimit (line 1672) | func enforceCacheControlLimit(payload []byte, maxBlocks int) []byte {
function injectMessagesCacheControl (line 1739) | func injectMessagesCacheControl(payload []byte) []byte {
function injectToolsCacheControl (line 1823) | func injectToolsCacheControl(payload []byte) []byte {
function injectSystemCacheControl (line 1861) | func injectSystemCacheControl(payload []byte) []byte {
FILE: internal/runtime/executor/claude_executor_test.go
function TestApplyClaudeToolPrefix (line 22) | func TestApplyClaudeToolPrefix(t *testing.T) {
function TestApplyClaudeToolPrefix_WithToolReference (line 40) | func TestApplyClaudeToolPrefix_WithToolReference(t *testing.T) {
function TestApplyClaudeToolPrefix_SkipsBuiltinTools (line 52) | func TestApplyClaudeToolPrefix_SkipsBuiltinTools(t *testing.T) {
function TestApplyClaudeToolPrefix_BuiltinToolSkipped (line 64) | func TestApplyClaudeToolPrefix_BuiltinToolSkipped(t *testing.T) {
function TestApplyClaudeToolPrefix_KnownBuiltinInHistoryOnly (line 93) | func TestApplyClaudeToolPrefix_KnownBuiltinInHistoryOnly(t *testing.T) {
function TestApplyClaudeToolPrefix_CustomToolsPrefixed (line 114) | func TestApplyClaudeToolPrefix_CustomToolsPrefixed(t *testing.T) {
function TestApplyClaudeToolPrefix_ToolChoiceBuiltin (line 140) | func TestApplyClaudeToolPrefix_ToolChoiceBuiltin(t *testing.T) {
function TestStripClaudeToolPrefixFromResponse (line 155) | func TestStripClaudeToolPrefixFromResponse(t *testing.T) {
function TestStripClaudeToolPrefixFromResponse_WithToolReference (line 167) | func TestStripClaudeToolPrefixFromResponse_WithToolReference(t *testing....
function TestStripClaudeToolPrefixFromStreamLine (line 179) | func TestStripClaudeToolPrefixFromStreamLine(t *testing.T) {
function TestStripClaudeToolPrefixFromStreamLine_WithToolReference (line 192) | func TestStripClaudeToolPrefixFromStreamLine_WithToolReference(t *testin...
function TestApplyClaudeToolPrefix_NestedToolReference (line 205) | func TestApplyClaudeToolPrefix_NestedToolReference(t *testing.T) {
function TestClaudeExecutor_ReusesUserIDAcrossModelsWhenCacheEnabled (line 214) | func TestClaudeExecutor_ReusesUserIDAcrossModelsWhenCacheEnabled(t *test...
function TestClaudeExecutor_GeneratesNewUserIDByDefault (line 282) | func TestClaudeExecutor_GeneratesNewUserIDByDefault(t *testing.T) {
function TestStripClaudeToolPrefixFromResponse_NestedToolReference (line 327) | func TestStripClaudeToolPrefixFromResponse_NestedToolReference(t *testin...
function TestApplyClaudeToolPrefix_NestedToolReferenceWithStringContent (line 336) | func TestApplyClaudeToolPrefix_NestedToolReferenceWithStringContent(t *t...
function TestApplyClaudeToolPrefix_SkipsBuiltinToolReference (line 346) | func TestApplyClaudeToolPrefix_SkipsBuiltinToolReference(t *testing.T) {
function TestNormalizeCacheControlTTL_DowngradesLaterOneHourBlocks (line 355) | func TestNormalizeCacheControlTTL_DowngradesLaterOneHourBlocks(t *testin...
function TestNormalizeCacheControlTTL_PreservesOriginalBytesWhenNoChange (line 372) | func TestNormalizeCacheControlTTL_PreservesOriginalBytesWhenNoChange(t *...
function TestEnforceCacheControlLimit_StripsNonLastToolBeforeMessages (line 385) | func TestEnforceCacheControlLimit_StripsNonLastToolBeforeMessages(t *tes...
function TestEnforceCacheControlLimit_ToolOnlyPayloadStillRespectsLimit (line 414) | func TestEnforceCacheControlLimit_ToolOnlyPayloadStillRespectsLimit(t *t...
function TestClaudeExecutor_CountTokens_AppliesCacheControlGuards (line 438) | func TestClaudeExecutor_CountTokens_AppliesCacheControlGuards(t *testing...
function hasTTLOrderingViolation (line 488) | func hasTTLOrderingViolation(payload []byte) bool {
function TestClaudeExecutor_Execute_InvalidGzipErrorBodyReturnsDecodeMessage (line 539) | func TestClaudeExecutor_Execute_InvalidGzipErrorBodyReturnsDecodeMessage...
function TestClaudeExecutor_ExecuteStream_InvalidGzipErrorBodyReturnsDecodeMessage (line 549) | func TestClaudeExecutor_ExecuteStream_InvalidGzipErrorBodyReturnsDecodeM...
function TestClaudeExecutor_CountTokens_InvalidGzipErrorBodyReturnsDecodeMessage (line 559) | func TestClaudeExecutor_CountTokens_InvalidGzipErrorBodyReturnsDecodeMes...
function testClaudeExecutorInvalidCompressedErrorBody (line 569) | func testClaudeExecutorInvalidCompressedErrorBody(
function TestClaudeExecutor_ExecuteStream_SetsIdentityAcceptEncoding (line 605) | func TestClaudeExecutor_ExecuteStream_SetsIdentityAcceptEncoding(t *test...
function TestClaudeExecutor_Execute_SetsCompressedAcceptEncoding (line 648) | func TestClaudeExecutor_Execute_SetsCompressedAcceptEncoding(t *testing....
function TestClaudeExecutor_ExecuteStream_GzipSuccessBodyDecoded (line 686) | func TestClaudeExecutor_ExecuteStream_GzipSuccessBodyDecoded(t *testing....
function TestDecodeResponseBody_MagicByteGzipNoHeader (line 735) | func TestDecodeResponseBody_MagicByteGzipNoHeader(t *testing.T) {
function TestDecodeResponseBody_PlainTextNoHeader (line 761) | func TestDecodeResponseBody_PlainTextNoHeader(t *testing.T) {
function TestClaudeExecutor_ExecuteStream_GzipNoContentEncodingHeader (line 783) | func TestClaudeExecutor_ExecuteStream_GzipNoContentEncodingHeader(t *tes...
function TestClaudeExecutor_ExecuteStream_AcceptEncodingOverrideCannotBypassIdentity (line 833) | func TestClaudeExecutor_ExecuteStream_AcceptEncodingOverrideCannotBypass...
function TestDecodeResponseBody_MagicByteZstdNoHeader (line 874) | func TestDecodeResponseBody_MagicByteZstdNoHeader(t *testing.T) {
function TestClaudeExecutor_Execute_GzipErrorBodyNoContentEncodingHeader (line 905) | func TestClaudeExecutor_Execute_GzipErrorBodyNoContentEncodingHeader(t *...
function TestClaudeExecutor_ExecuteStream_GzipErrorBodyNoContentEncodingHeader (line 946) | func TestClaudeExecutor_ExecuteStream_GzipErrorBodyNoContentEncodingHead...
function TestCheckSystemInstructionsWithMode_StringSystemPreserved (line 985) | func TestCheckSystemInstructionsWithMode_StringSystemPreserved(t *testin...
function TestCheckSystemInstructionsWithMode_StringSystemStrict (line 1015) | func TestCheckSystemInstructionsWithMode_StringSystemStrict(t *testing.T) {
function TestCheckSystemInstructionsWithMode_EmptyStringSystemIgnored (line 1027) | func TestCheckSystemInstructionsWithMode_EmptyStringSystemIgnored(t *tes...
function TestCheckSystemInstructionsWithMode_ArraySystemStillWorks (line 1039) | func TestCheckSystemInstructionsWithMode_ArraySystemStillWorks(t *testin...
function TestCheckSystemInstructionsWithMode_StringWithSpecialChars (line 1054) | func TestCheckSystemInstructionsWithMode_StringWithSpecialChars(t *testi...
FILE: internal/runtime/executor/cloak_obfuscate.go
constant zeroWidthSpace (line 14) | zeroWidthSpace = "\u200B"
type SensitiveWordMatcher (line 17) | type SensitiveWordMatcher struct
method obfuscateText (line 77) | func (m *SensitiveWordMatcher) obfuscateText(text string) string {
function buildSensitiveWordMatcher (line 23) | func buildSensitiveWordMatcher(words []string) *SensitiveWordMatcher {
function obfuscateWord (line 62) | func obfuscateWord(word string) string {
function obfuscateSensitiveWords (line 86) | func obfuscateSensitiveWords(payload []byte, matcher *SensitiveWordMatch...
function obfuscateSystemBlocks (line 101) | func obfuscateSystemBlocks(payload []byte, matcher *SensitiveWordMatcher...
function obfuscateMessages (line 136) | func obfuscateMessages(payload []byte, matcher *SensitiveWordMatcher) []...
FILE: internal/runtime/executor/cloak_utils.go
function generateFakeUserID (line 17) | func generateFakeUserID() string {
function isValidUserID (line 27) | func isValidUserID(userID string) bool {
function shouldCloak (line 33) | func shouldCloak(cloakMode string, userAgent string) bool {
function isClaudeCodeClient (line 46) | func isClaudeCodeClient(userAgent string) bool {
FILE: internal/runtime/executor/codex_executor.go
constant codexClientVersion (line 31) | codexClientVersion = "0.101.0"
constant codexUserAgent (line 32) | codexUserAgent = "codex_cli_rs/0.101.0 (Mac OS 26.0.1; arm64) Apple_...
type CodexExecutor (line 39) | type CodexExecutor struct
method Identifier (line 45) | func (e *CodexExecutor) Identifier() string { return "codex" }
method PrepareRequest (line 48) | func (e *CodexExecutor) PrepareRequest(req *http.Request, auth *clipro...
method HttpRequest (line 65) | func (e *CodexExecutor) HttpRequest(ctx context.Context, auth *cliprox...
method Execute (line 80) | func (e *CodexExecutor) Execute(ctx context.Context, auth *cliproxyaut...
method executeCompact (line 193) | func (e *CodexExecutor) executeCompact(ctx context.Context, auth *clip...
method ExecuteStream (line 280) | func (e *CodexExecutor) ExecuteStream(ctx context.Context, auth *clipr...
method CountTokens (line 402) | func (e *CodexExecutor) CountTokens(ctx context.Context, auth *cliprox...
method Refresh (line 560) | func (e *CodexExecutor) Refresh(ctx context.Context, auth *cliproxyaut...
method cacheHelper (line 599) | func (e *CodexExecutor) cacheHelper(ctx context.Context, from sdktrans...
method resolveCodexConfig (line 726) | func (e *CodexExecutor) resolveCodexConfig(auth *cliproxyauth.Auth) *c...
function NewCodexExecutor (line 43) | func NewCodexExecutor(cfg *config.Config) *CodexExecutor { return &Codex...
function tokenizerForCodexModel (line 438) | func tokenizerForCodexModel(model string) (tokenizer.Codec, error) {
function countCodexInputTokens (line 458) | func countCodexInputTokens(enc tokenizer.Codec, body []byte) (int64, err...
function applyCodexHeaders (line 639) | func applyCodexHeaders(r *http.Request, auth *cliproxyauth.Auth, token s...
function newCodexStatusErr (line 681) | func newCodexStatusErr(statusCode int, body []byte) statusErr {
function parseCodexRetryAfter (line 689) | func parseCodexRetryAfter(statusCode int, errorBody []byte, now time.Tim...
function codexCreds (line 710) | func codexCreds(a *cliproxyauth.Auth) (apiKey, baseURL string) {
FILE: internal/runtime/executor/codex_executor_cache_test.go
function TestCodexExecutorCacheHelper_OpenAIChatCompletions_StablePromptCacheKeyFromAPIKey (line 16) | func TestCodexExecutorCacheHelper_OpenAIChatCompletions_StablePromptCach...
FILE: internal/runtime/executor/codex_executor_retry_test.go
function TestParseCodexRetryAfter (line 10) | func TestParseCodexRetryAfter(t *testing.T) {
function itoa (line 63) | func itoa(v int64) string {
FILE: internal/runtime/executor/codex_websockets_executor.go
constant codexResponsesWebsocketBetaHeaderValue (line 35) | codexResponsesWebsocketBetaHeaderValue = "responses_websockets=2026-02-06"
constant codexResponsesWebsocketIdleTimeout (line 36) | codexResponsesWebsocketIdleTimeout = 5 * time.Minute
constant codexResponsesWebsocketHandshakeTO (line 37) | codexResponsesWebsocketHandshakeTO = 30 * time.Second
type CodexWebsocketsExecutor (line 44) | type CodexWebsocketsExecutor struct
method Execute (line 144) | func (e *CodexWebsocketsExecutor) Execute(ctx context.Context, auth *c...
method ExecuteStream (line 352) | func (e *CodexWebsocketsExecutor) ExecuteStream(ctx context.Context, a...
method dialCodexWebsocket (line 610) | func (e *CodexWebsocketsExecutor) dialCodexWebsocket(ctx context.Conte...
method getOrCreateSession (line 1048) | func (e *CodexWebsocketsExecutor) getOrCreateSession(sessionID string)...
method ensureUpstreamConn (line 1066) | func (e *CodexWebsocketsExecutor) ensureUpstreamConn(ctx context.Conte...
method readUpstreamLoop (line 1112) | func (e *CodexWebsocketsExecutor) readUpstreamLoop(sess *codexWebsocke...
method invalidateUpstreamConn (line 1173) | func (e *CodexWebsocketsExecutor) invalidateUpstreamConn(sess *codexWe...
method CloseExecutionSession (line 1199) | func (e *CodexWebsocketsExecutor) CloseExecutionSession(sessionID stri...
method closeAllExecutionSessions (line 1220) | func (e *CodexWebsocketsExecutor) closeAllExecutionSessions(reason str...
method closeExecutionSession (line 1240) | func (e *CodexWebsocketsExecutor) closeExecutionSession(sess *codexWeb...
type codexWebsocketSession (line 51) | type codexWebsocketSession struct
method setActive (line 85) | func (s *codexWebsocketSession) setActive(ch chan codexWebsocketRead) {
method clearActive (line 104) | func (s *codexWebsocketSession) clearActive(ch chan codexWebsocketRead) {
method writeMessage (line 120) | func (s *codexWebsocketSession) writeMessage(conn *websocket.Conn, msg...
method configureConn (line 132) | func (s *codexWebsocketSession) configureConn(conn *websocket.Conn) {
function NewCodexWebsocketsExecutor (line 71) | func NewCodexWebsocketsExecutor(cfg *config.Config) *CodexWebsocketsExec...
type codexWebsocketRead (line 78) | type codexWebsocketRead struct
function writeCodexWebsocketMessage (line 626) | func writeCodexWebsocketMessage(sess *codexWebsocketSession, conn *webso...
function buildCodexWebsocketRequestBody (line 636) | func buildCodexWebsocketRequestBody(body []byte) []byte {
function readCodexWebsocketMessage (line 653) | func readCodexWebsocketMessage(ctx context.Context, sess *codexWebsocket...
function newProxyAwareWebsocketDialer (line 687) | func newProxyAwareWebsocketDialer(cfg *config.Config, auth *cliproxyauth...
function buildCodexResponsesWebsocketURL (line 750) | func buildCodexResponsesWebsocketURL(httpURL string) (string, error) {
function applyCodexPromptCacheHeaders (line 764) | func applyCodexPromptCacheHeaders(from sdktranslator.Format, req cliprox...
function applyCodexWebsocketHeaders (line 800) | func applyCodexWebsocketHeaders(ctx context.Context, headers http.Header...
function codexHeaderDefaults (line 857) | func codexHeaderDefaults(cfg *config.Config, auth *cliproxyauth.Auth) (s...
function ensureHeaderWithPriority (line 869) | func ensureHeaderWithPriority(target http.Header, source http.Header, ke...
function ensureHeaderWithConfigPrecedence (line 891) | func ensureHeaderWithConfigPrecedence(target http.Header, source http.He...
type statusErrWithHeaders (line 913) | type statusErrWithHeaders struct
method Headers (line 918) | func (e statusErrWithHeaders) Headers() http.Header {
function parseCodexWebsocketError (line 925) | func parseCodexWebsocketError(payload []byte) (error, bool) {
function parseCodexWebsocketErrorHeaders (line 959) | func parseCodexWebsocketErrorHeaders(payload []byte) http.Header {
function normalizeCodexWebsocketCompletion (line 989) | func normalizeCodexWebsocketCompletion(payload []byte) []byte {
function encodeCodexWebsocketAsSSE (line 999) | func encodeCodexWebsocketAsSSE(payload []byte) []byte {
function websocketHandshakeBody (line 1009) | func websocketHandshakeBody(resp *http.Response) []byte {
function closeHTTPResponseBody (line 1021) | func closeHTTPResponseBody(resp *http.Response, logPrefix string) {
function executionSessionIDFromOptions (line 1030) | func executionSessionIDFromOptions(opts cliproxyexecutor.Options) string {
function logCodexWebsocketConnected (line 1269) | func logCodexWebsocketConnected(sessionID string, authID string, wsURL s...
function logCodexWebsocketDisconnected (line 1273) | func logCodexWebsocketDisconnected(sessionID string, authID string, wsUR...
type CodexAutoExecutor (line 1286) | type CodexAutoExecutor struct
method Identifier (line 1298) | func (e *CodexAutoExecutor) Identifier() string { return "codex" }
method PrepareRequest (line 1300) | func (e *CodexAutoExecutor) PrepareRequest(req *http.Request, auth *cl...
method HttpRequest (line 1307) | func (e *CodexAutoExecutor) HttpRequest(ctx context.Context, auth *cli...
method Execute (line 1314) | func (e *CodexAutoExecutor) Execute(ctx context.Context, auth *cliprox...
method ExecuteStream (line 1324) | func (e *CodexAutoExecutor) ExecuteStream(ctx context.Context, auth *c...
method Refresh (line 1334) | func (e *CodexAutoExecutor) Refresh(ctx context.Context, auth *cliprox...
method CountTokens (line 1341) | func (e *CodexAutoExecutor) CountTokens(ctx context.Context, auth *cli...
method CloseExecutionSession (line 1348) | func (e *CodexAutoExecutor) CloseExecutionSession(sessionID string) {
function NewCodexAutoExecutor (line 1291) | func NewCodexAutoExecutor(cfg *config.Config) *CodexAutoExecutor {
function codexWebsocketsEnabled (line 1355) | func codexWebsocketsEnabled(auth *cliproxyauth.Auth) bool {
FILE: internal/runtime/executor/codex_websockets_executor_test.go
function TestBuildCodexWebsocketRequestBodyPreservesPreviousResponseID (line 16) | func TestBuildCodexWebsocketRequestBodyPreservesPreviousResponseID(t *te...
function TestApplyCodexWebsocketHeadersDefaultsToCurrentResponsesBeta (line 35) | func TestApplyCodexWebsocketHeadersDefaultsToCurrentResponsesBeta(t *tes...
function TestApplyCodexWebsocketHeadersUsesConfigDefaultsForOAuth (line 49) | func TestApplyCodexWebsocketHeadersUsesConfigDefaultsForOAuth(t *testing...
function TestApplyCodexWebsocketHeadersPrefersExistingHeadersOverClientAndConfig (line 74) | func TestApplyCodexWebsocketHeadersPrefersExistingHeadersOverClientAndCo...
function TestApplyCodexWebsocketHeadersConfigUserAgentOverridesClientHeader (line 103) | func TestApplyCodexWebsocketHeadersConfigUserAgentOverridesClientHeader(...
function TestApplyCodexWebsocketHeadersIgnoresConfigForAPIKeyAuth (line 129) | func TestApplyCodexWebsocketHeadersIgnoresConfigForAPIKeyAuth(t *testing...
function TestApplyCodexHeadersUsesConfigUserAgentForOAuth (line 151) | func TestApplyCodexHeadersUsesConfigUserAgentForOAuth(t *testing.T) {
function contextWithGinHeaders (line 180) | func contextWithGinHeaders(headers map[string]string) context.Context {
function TestNewProxyAwareWebsocketDialerDirectDisablesProxy (line 192) | func TestNewProxyAwareWebsocketDialerDirectDisablesProxy(t *testing.T) {
FILE: internal/runtime/executor/gemini_cli_executor.go
constant codeAssistEndpoint (line 35) | codeAssistEndpoint = "https://cloudcode-pa.googleapis.com"
constant codeAssistVersion (line 36) | codeAssistVersion = "v1internal"
constant geminiOAuthClientID (line 37) | geminiOAuthClientID = "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j...
constant geminiOAuthClientSecret (line 38) | geminiOAuthClientSecret = "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"
type GeminiCLIExecutor (line 48) | type GeminiCLIExecutor struct
method Identifier (line 64) | func (e *GeminiCLIExecutor) Identifier() string { return "gemini-cli" }
method PrepareRequest (line 67) | func (e *GeminiCLIExecutor) PrepareRequest(req *http.Request, auth *cl...
method HttpRequest (line 88) | func (e *GeminiCLIExecutor) HttpRequest(ctx context.Context, auth *cli...
method Execute (line 104) | func (e *GeminiCLIExecutor) Execute(ctx context.Context, auth *cliprox...
method ExecuteStream (line 258) | func (e *GeminiCLIExecutor) ExecuteStream(ctx context.Context, auth *c...
method CountTokens (line 456) | func (e *GeminiCLIExecutor) CountTokens(ctx context.Context, auth *cli...
method Refresh (line 565) | func (e *GeminiCLIExecutor) Refresh(_ context.Context, auth *cliproxya...
function NewGeminiCLIExecutor (line 59) | func NewGeminiCLIExecutor(cfg *config.Config) *GeminiCLIExecutor {
function prepareGeminiCLITokenSource (line 569) | func prepareGeminiCLITokenSource(ctx context.Context, cfg *config.Config...
function updateGeminiCLITokenMetadata (line 627) | func updateGeminiCLITokenMetadata(auth *cliproxyauth.Auth, base map[stri...
function buildGeminiTokenMap (line 649) | func buildGeminiTokenMap(base map[string]any, tok *oauth2.Token) map[str...
function buildGeminiTokenFields (line 665) | func buildGeminiTokenFields(tok *oauth2.Token, merged map[string]any) ma...
function resolveGeminiProjectID (line 685) | func resolveGeminiProjectID(auth *cliproxyauth.Auth) string {
function geminiOAuthMetadata (line 697) | func geminiOAuthMetadata(auth *cliproxyauth.Auth) map[string]any {
function newHTTPClient (line 709) | func newHTTPClient(ctx context.Context, cfg *config.Config, auth *clipro...
function cloneMap (line 713) | func cloneMap(in map[string]any) map[string]any {
function stringValue (line 724) | func stringValue(m map[string]any, key string) string {
function applyGeminiCLIHeaders (line 742) | func applyGeminiCLIHeaders(r *http.Request, model string) {
function cliPreviewFallbackOrder (line 748) | func cliPreviewFallbackOrder(model string) []string {
function setJSONField (line 770) | func setJSONField(body []byte, key, value string) []byte {
function deleteJSONField (line 782) | func deleteJSONField(body []byte, key string) []byte {
function fixGeminiCLIImageAspectRatio (line 793) | func fixGeminiCLIImageAspectRatio(modelName string, rawJSON []byte) []by...
function newGeminiStatusErr (line 835) | func newGeminiStatusErr(statusCode int, body []byte) statusErr {
function parseRetryDelay (line 848) | func parseRetryDelay(errorBody []byte) (*time.Duration, error) {
FILE: internal/runtime/executor/gemini_executor.go
constant glEndpoint (line 28) | glEndpoint = "https://generativelanguage.googleapis.com"
constant glAPIVersion (line 31) | glAPIVersion = "v1beta"
constant streamScannerBuffer (line 34) | streamScannerBuffer = 52_428_800
type GeminiExecutor (line 40) | type GeminiExecutor struct
method Identifier (line 57) | func (e *GeminiExecutor) Identifier() string { return "gemini" }
method PrepareRequest (line 60) | func (e *GeminiExecutor) PrepareRequest(req *http.Request, auth *clipr...
method HttpRequest (line 77) | func (e *GeminiExecutor) HttpRequest(ctx context.Context, auth *clipro...
method Execute (line 105) | func (e *GeminiExecutor) Execute(ctx context.Context, auth *cliproxyau...
method ExecuteStream (line 213) | func (e *GeminiExecutor) ExecuteStream(ctx context.Context, auth *clip...
method CountTokens (line 341) | func (e *GeminiExecutor) CountTokens(ctx context.Context, auth *clipro...
method Refresh (line 422) | func (e *GeminiExecutor) Refresh(_ context.Context, auth *cliproxyauth...
method resolveGeminiConfig (line 462) | func (e *GeminiExecutor) resolveGeminiConfig(auth *cliproxyauth.Auth) ...
function NewGeminiExecutor (line 52) | func NewGeminiExecutor(cfg *config.Config) *GeminiExecutor {
function geminiCreds (line 426) | func geminiCreds(a *cliproxyauth.Auth) (apiKey, bearer string) {
function resolveGeminiBaseURL (line 449) | func resolveGeminiBaseURL(auth *cliproxyauth.Auth) string {
function applyGeminiHeaders (line 501) | func applyGeminiHeaders(req *http.Request, auth *cliproxyauth.Auth) {
function fixGeminiImageAspectRatio (line 509) | func fixGeminiImageAspectRatio(modelName string, rawJSON []byte) []byte {
FILE: internal/runtime/executor/gemini_vertex_executor.go
constant vertexAPIVersion (line 32) | vertexAPIVersion = "v1"
function isImagenModel (line 37) | func isImagenModel(model string) bool {
function getVertexAction (line 44) | func getVertexAction(model string, isStream bool) string {
function convertImagenToGeminiResponse (line 57) | func convertImagenToGeminiResponse(data []byte, model string) []byte {
function convertToImagenRequest (line 111) | func convertToImagenRequest(payload []byte) ([]byte, error) {
type GeminiVertexExecutor (line 173) | type GeminiVertexExecutor struct
method Identifier (line 189) | func (e *GeminiVertexExecutor) Identifier() string { return "vertex" }
method PrepareRequest (line 192) | func (e *GeminiVertexExecutor) PrepareRequest(req *http.Request, auth ...
method HttpRequest (line 219) | func (e *GeminiVertexExecutor) HttpRequest(ctx context.Context, auth *...
method Execute (line 235) | func (e *GeminiVertexExecutor) Execute(ctx context.Context, auth *clip...
method ExecuteStream (line 256) | func (e *GeminiVertexExecutor) ExecuteStream(ctx context.Context, auth...
method CountTokens (line 277) | func (e *GeminiVertexExecutor) CountTokens(ctx context.Context, auth *...
method Refresh (line 295) | func (e *GeminiVertexExecutor) Refresh(_ context.Context, auth *clipro...
method executeWithServiceAccount (line 301) | func (e *GeminiVertexExecutor) executeWithServiceAccount(ctx context.C...
method executeWithAPIKey (line 427) | func (e *GeminiVertexExecutor) executeWithAPIKey(ctx context.Context, ...
method executeStreamWithServiceAccount (line 532) | func (e *GeminiVertexExecutor) executeStreamWithServiceAccount(ctx con...
method executeStreamWithAPIKey (line 656) | func (e *GeminiVertexExecutor) executeStreamWithAPIKey(ctx context.Con...
method countTokensWithServiceAccount (line 780) | func (e *GeminiVertexExecutor) countTokensWithServiceAccount(ctx conte...
method countTokensWithAPIKey (line 864) | func (e *GeminiVertexExecutor) countTokensWithAPIKey(ctx context.Conte...
method resolveVertexConfig (line 1031) | func (e *GeminiVertexExecutor) resolveVertexConfig(auth *cliproxyauth....
function NewGeminiVertexExecutor (line 184) | func NewGeminiVertexExecutor(cfg *config.Config) *GeminiVertexExecutor {
function vertexCreds (line 948) | func vertexCreds(a *cliproxyauth.Auth) (projectID, location string, serv...
function vertexAPICreds (line 988) | func vertexAPICreds(a *cliproxyauth.Auth) (apiKey, baseURL string) {
function vertexBaseURL (line 1004) | func vertexBaseURL(location string) string {
function vertexAccessToken (line 1014) | func vertexAccessToken(ctx context.Context, cfg *config.Config, auth *cl...
FILE: internal/runtime/executor/iflow_executor.go
constant iflowDefaultEndpoint (line 30) | iflowDefaultEndpoint = "/chat/completions"
constant iflowUserAgent (line 31) | iflowUserAgent = "iFlow-Cli"
type IFlowExecutor (line 35) | type IFlowExecutor struct
method Identifier (line 43) | func (e *IFlowExecutor) Identifier() string { return "iflow" }
method PrepareRequest (line 46) | func (e *IFlowExecutor) PrepareRequest(req *http.Request, auth *clipro...
method HttpRequest (line 58) | func (e *IFlowExecutor) HttpRequest(ctx context.Context, auth *cliprox...
method Execute (line 74) | func (e *IFlowExecutor) Execute(ctx context.Context, auth *cliproxyaut...
method ExecuteStream (line 177) | func (e *IFlowExecutor) ExecuteStream(ctx context.Context, auth *clipr...
method CountTokens (line 299) | func (e *IFlowExecutor) CountTokens(ctx context.Context, auth *cliprox...
method Refresh (line 322) | func (e *IFlowExecutor) Refresh(ctx context.Context, auth *cliproxyaut...
method refreshCookieBased (line 350) | func (e *IFlowExecutor) refreshCookieBased(ctx context.Context, auth *...
method refreshOAuthBased (line 401) | func (e *IFlowExecutor) refreshOAuthBased(ctx context.Context, auth *c...
function NewIFlowExecutor (line 40) | func NewIFlowExecutor(cfg *config.Config) *IFlowExecutor { return &IFlow...
function applyIFlowHeaders (line 455) | func applyIFlowHeaders(r *http.Request, apiKey string, stream bool) {
function createIFlowSignature (line 482) | func createIFlowSignature(userAgent, sessionID string, timestamp int64, ...
function generateUUID (line 493) | func generateUUID() string {
function iflowCreds (line 497) | func iflowCreds(a *cliproxyauth.Auth) (apiKey, baseURL string) {
function ensureToolsArray (line 522) | func ensureToolsArray(body []byte) []byte {
function preserveReasoningContentInMessages (line 538) | func preserveReasoningContentInMessages(body []byte) []byte {
FILE: internal/runtime/executor/iflow_executor_test.go
function TestIFlowExecutorParseSuffix (line 9) | func TestIFlowExecutorParseSuffix(t *testing.T) {
function TestPreserveReasoningContentInMessages (line 32) | func TestPreserveReasoningContentInMessages(t *testing.T) {
FILE: internal/runtime/executor/kimi_executor.go
type KimiExecutor (line 28) | type KimiExecutor struct
method Identifier (line 37) | func (e *KimiExecutor) Identifier() string { return "kimi" }
method PrepareRequest (line 40) | func (e *KimiExecutor) PrepareRequest(req *http.Request, auth *cliprox...
method HttpRequest (line 52) | func (e *KimiExecutor) HttpRequest(ctx context.Context, auth *cliproxy...
method Execute (line 68) | func (e *KimiExecutor) Execute(ctx context.Context, auth *cliproxyauth...
method ExecuteStream (line 169) | func (e *KimiExecutor) ExecuteStream(ctx context.Context, auth *clipro...
method CountTokens (line 291) | func (e *KimiExecutor) CountTokens(ctx context.Context, auth *cliproxy...
method Refresh (line 441) | func (e *KimiExecutor) Refresh(ctx context.Context, auth *cliproxyauth...
function NewKimiExecutor (line 34) | func NewKimiExecutor(cfg *config.Config) *KimiExecutor { return &KimiExe...
function normalizeKimiToolMessageLinks (line 296) | func normalizeKimiToolMessageLinks(body []byte) ([]byte, error) {
function fallbackAssistantReasoning (line 412) | func fallbackAssistantReasoning(msg gjson.Result, hasLatest bool, latest...
function applyKimiHeaders (line 482) | func applyKimiHeaders(r *http.Request, token string, stream bool) {
function resolveKimiDeviceIDFromAuth (line 499) | func resolveKimiDeviceIDFromAuth(auth *cliproxyauth.Auth) string {
function resolveKimiDeviceIDFromStorage (line 517) | func resolveKimiDeviceIDFromStorage(auth *cliproxyauth.Auth) string {
function resolveKimiDeviceID (line 530) | func resolveKimiDeviceID(auth *cliproxyauth.Auth) string {
function applyKimiHeadersWithAuth (line 538) | func applyKimiHeadersWithAuth(r *http.Request, token string, stream bool...
function getKimiHostname (line 547) | func getKimiHostname() string {
function getKimiDeviceModel (line 556) | func getKimiDeviceModel() string {
function getKimiDeviceID (line 561) | func getKimiDeviceID() string {
function kimiCreds (line 588) | func kimiCreds(a *cliproxyauth.Auth) (token string) {
function stripKimiPrefix (line 611) | func stripKimiPrefix(model string) string {
FILE: internal/runtime/executor/kimi_executor_test.go
function TestNormalizeKimiToolMessageLinks_UsesCallIDFallback (line 9) | func TestNormalizeKimiToolMessageLinks_UsesCallIDFallback(t *testing.T) {
function TestNormalizeKimiToolMessageLinks_InferSinglePendingID (line 28) | func TestNormalizeKimiToolMessageLinks_InferSinglePendingID(t *testing.T) {
function TestNormalizeKimiToolMessageLinks_AmbiguousMissingIDIsNotInferred (line 47) | func TestNormalizeKimiToolMessageLinks_AmbiguousMissingIDIsNotInferred(t...
function TestNormalizeKimiToolMessageLinks_PreservesExistingToolCallID (line 68) | func TestNormalizeKimiToolMessageLinks_PreservesExistingToolCallID(t *te...
function TestNormalizeKimiToolMessageLinks_InheritsPreviousReasoningForAssistantToolCalls (line 87) | func TestNormalizeKimiToolMessageLinks_InheritsPreviousReasoningForAssis...
function TestNormalizeKimiToolMessageLinks_InsertsFallbackReasoningWhenMissing (line 106) | func TestNormalizeKimiToolMessageLinks_InsertsFallbackReasoningWhenMissi...
function TestNormalizeKimiToolMessageLinks_UsesContentAsReasoningFallback (line 127) | func TestNormalizeKimiToolMessageLinks_UsesContentAsReasoningFallback(t ...
function TestNormalizeKimiToolMessageLinks_ReplacesEmptyReasoningContent (line 145) | func TestNormalizeKimiToolMessageLinks_ReplacesEmptyReasoningContent(t *...
function TestNormalizeKimiToolMessageLinks_PreservesExistingAssistantReasoning (line 163) | func TestNormalizeKimiToolMessageLinks_PreservesExistingAssistantReasoni...
function TestNormalizeKimiToolMessageLinks_RepairsIDsAndReasoningTogether (line 181) | func TestNormalizeKimiToolMessageLinks_RepairsIDsAndReasoningTogether(t ...
FILE: internal/runtime/executor/logging_helpers.go
constant apiAttemptsKey (line 22) | apiAttemptsKey = "API_UPSTREAM_ATTEMPTS"
constant apiRequestKey (line 23) | apiRequestKey = "API_REQUEST"
constant apiResponseKey (line 24) | apiResponseKey = "API_RESPONSE"
type upstreamRequestLog (line 28) | type upstreamRequestLog struct
type upstreamAttempt (line 40) | type upstreamAttempt struct
function recordAPIRequest (line 53) | func recordAPIRequest(ctx context.Context, cfg *config.Config, info upst...
function recordAPIResponseMetadata (line 100) | func recordAPIResponseMetadata(ctx context.Context, cfg *config.Config, ...
function recordAPIResponseError (line 126) | func recordAPIResponseError(ctx context.Context, cfg *config.Config, err...
function appendAPIResponseChunk (line 151) | func appendAPIResponseChunk(ctx context.Context, cfg *config.Config, chu...
function ginContextFrom (line 185) | func ginContextFrom(ctx context.Context) *gin.Context {
function getAttempts (line 190) | func getAttempts(ginCtx *gin.Context) []*upstreamAttempt {
function ensureAttempt (line 202) | func ensureAttempt(ginCtx *gin.Context) ([]*upstreamAttempt, *upstreamAt...
function ensureResponseIntro (line 217) | func ensureResponseIntro(attempt *upstreamAttempt) {
function updateAggregatedRequest (line 227) | func updateAggregatedRequest(ginCtx *gin.Context, attempts []*upstreamAt...
function updateAggregatedResponse (line 238) | func updateAggregatedResponse(ginCtx *gin.Context, attempts []*upstreamA...
function writeHeaders (line 262) | func writeHeaders(builder *strings.Builder, headers http.Header) {
function formatAuthInfo (line 288) | func formatAuthInfo(info upstreamRequestLog) string {
function summarizeErrorBody (line 324) | func summarizeErrorBody(contentType string, body []byte) string {
function extractHTMLTitle (line 347) | func extractHTMLTitle(body []byte) string {
function extractJSONErrorMessage (line 372) | func extractJSONErrorMessage(body []byte) string {
function logWithRequestID (line 382) | func logWithRequestID(ctx context.Context) *log.Entry {
FILE: internal/runtime/executor/openai_compat_executor.go
type OpenAICompatExecutor (line 26) | type OpenAICompatExecutor struct
method Identifier (line 37) | func (e *OpenAICompatExecutor) Identifier() string { return e.provider }
method PrepareRequest (line 40) | func (e *OpenAICompatExecutor) PrepareRequest(req *http.Request, auth ...
method HttpRequest (line 57) | func (e *OpenAICompatExecutor) HttpRequest(ctx context.Context, auth *...
method Execute (line 72) | func (e *OpenAICompatExecutor) Execute(ctx context.Context, auth *clip...
method ExecuteStream (line 179) | func (e *OpenAICompatExecutor) ExecuteStream(ctx context.Context, auth...
method CountTokens (line 307) | func (e *OpenAICompatExecutor) CountTokens(ctx context.Context, auth *...
method Refresh (line 337) | func (e *OpenAICompatExecutor) Refresh(ctx context.Context, auth *clip...
method resolveCredentials (line 343) | func (e *OpenAICompatExecutor) resolveCredentials(auth *cliproxyauth.A...
method resolveCompatConfig (line 354) | func (e *OpenAICompatExecutor) resolveCompatConfig(auth *cliproxyauth....
method overrideModel (line 381) | func (e *OpenAICompatExecutor) overrideModel(payload []byte, model str...
function NewOpenAICompatExecutor (line 32) | func NewOpenAICompatExecutor(provider string, cfg *config.Config) *OpenA...
type statusErr (line 389) | type statusErr struct
method Error (line 395) | func (e statusErr) Error() string {
method StatusCode (line 401) | func (e statusErr) StatusCode() int { return e.code }
method RetryAfter (line 402) | func (e statusErr) RetryAfter() *time.Duration { return e.retryAfter }
FILE: internal/runtime/executor/openai_compat_executor_compact_test.go
function TestOpenAICompatExecutorCompactPassthrough (line 17) | func TestOpenAICompatExecutorCompactPassthrough(t *testing.T) {
FILE: internal/runtime/executor/payload_helpers.go
function applyPayloadConfigWithRoot (line 19) | func applyPayloadConfigWithRoot(cfg *config.Config, model, protocol, roo...
function payloadModelRulesMatch (line 154) | func payloadModelRulesMatch(rules []config.PayloadModelRule, protocol st...
function payloadModelCandidates (line 175) | func payloadModelCandidates(model, requestedModel string) []string {
function buildPayloadPath (line 214) | func buildPayloadPath(root, path string) string {
function payloadRawValue (line 229) | func payloadRawValue(value any) ([]byte, bool) {
function payloadRequestedModel (line 247) | func payloadRequestedModel(opts cliproxyexecutor.Options, fallback strin...
function matchModelPattern (line 282) | func matchModelPattern(pattern, model string) bool {
FILE: internal/runtime/executor/proxy_helpers.go
function newProxyAwareHTTPClient (line 28) | func newProxyAwareHTTPClient(ctx context.Context, cfg *config.Config, au...
function buildProxyTransport (line 72) | func buildProxyTransport(proxyURL string) *http.Transport {
FILE: internal/runtime/executor/proxy_helpers_test.go
function TestNewProxyAwareHTTPClientDirectBypassesGlobalProxy (line 13) | func TestNewProxyAwareHTTPClientDirectBypassesGlobalProxy(t *testing.T) {
FILE: internal/runtime/executor/qwen_executor.go
constant qwenUserAgent (line 26) | qwenUserAgent = "QwenCode/0.10.3 (darwin; arm64)"
constant qwenRateLimitPerMin (line 27) | qwenRateLimitPerMin = 60
constant qwenRateLimitWindow (line 28) | qwenRateLimitWindow = time.Minute
function redactAuthID (line 58) | func redactAuthID(id string) string {
function checkQwenRateLimit (line 70) | func checkQwenRateLimit(authID string) error {
function isQwenQuotaError (line 124) | func isQwenQuotaError(body []byte) bool {
function wrapQwenError (line 149) | func wrapQwenError(ctx context.Context, httpCode int, body []byte) (errC...
function timeUntilNextDay (line 164) | func timeUntilNextDay() time.Duration {
type QwenExecutor (line 173) | type QwenExecutor struct
method Identifier (line 179) | func (e *QwenExecutor) Identifier() string { return "qwen" }
method PrepareRequest (line 182) | func (e *QwenExecutor) PrepareRequest(req *http.Request, auth *cliprox...
method HttpRequest (line 194) | func (e *QwenExecutor) HttpRequest(ctx context.Context, auth *cliproxy...
method Execute (line 209) | func (e *QwenExecutor) Execute(ctx context.Context, auth *cliproxyauth...
method ExecuteStream (line 312) | func (e *QwenExecutor) ExecuteStream(ctx context.Context, auth *clipro...
method CountTokens (line 440) | func (e *QwenExecutor) CountTokens(ctx context.Context, auth *cliproxy...
method Refresh (line 467) | func (e *QwenExecutor) Refresh(ctx context.Context, auth *cliproxyauth...
function NewQwenExecutor (line 177) | func NewQwenExecutor(cfg *config.Config) *QwenExecutor { return &QwenExe...
function applyQwenHeaders (line 507) | func applyQwenHeaders(r *http.Request, token string, stream bool) {
function qwenCreds (line 530) | func qwenCreds(a *cliproxyauth.Auth) (token, baseURL string) {
FILE: internal/runtime/executor/qwen_executor_test.go
function TestQwenExecutorParseSuffix (line 9) | func TestQwenExecutorParseSuffix(t *testing.T) {
FILE: internal/runtime/executor/token_helpers.go
function tokenizerForModel (line 12) | func tokenizerForModel(model string) (tokenizer.Codec, error) {
function countOpenAIChatTokens (line 41) | func countOpenAIChatTokens(enc tokenizer.Codec, payload []byte) (int64, ...
function buildOpenAIUsageJSON (line 73) | func buildOpenAIUsageJSON(count int64) []byte {
function collectOpenAIMessages (line 77) | func collectOpenAIMessages(messages gjson.Result, segments *[]string) {
function collectOpenAIContent (line 91) | func collectOpenAIContent(content gjson.Result, segments *[]string) {
function collectOpenAIToolCalls (line 132) | func collectOpenAIToolCalls(calls gjson.Result, segments *[]string) {
function collectOpenAIFunctionCall (line 152) | func collectOpenAIFunctionCall(call gjson.Result, segments *[]string) {
function collectOpenAITools (line 160) | func collectOpenAITools(tools gjson.Result, segments *[]string) {
function collectOpenAIFunctions (line 174) | func collectOpenAIFunctions(functions gjson.Result, segments *[]string) {
function collectOpenAIToolChoice (line 188) | func collectOpenAIToolChoice(choice gjson.Result, segments *[]string) {
function collectOpenAIResponseFormat (line 199) | func collectOpenAIResponseFormat(format gjson.Result, segments *[]string) {
function appendToolPayload (line 213) | func appendToolPayload(tool gjson.Result, segments *[]string) {
function addIfNotEmpty (line 229) | func addIfNotEmpty(segments *[]string, value string) {
FILE: internal/runtime/executor/usage_helpers.go
type usageReporter (line 18) | type usageReporter struct
method publish (line 45) | func (r *usageReporter) publish(ctx context.Context, detail usage.Deta...
method publishFailure (line 49) | func (r *usageReporter) publishFailure(ctx context.Context) {
method trackFailure (line 53) | func (r *usageReporter) trackFailure(ctx context.Context, errPtr *erro...
method publishWithOutcome (line 62) | func (r *usageReporter) publishWithOutcome(ctx context.Context, detail...
method ensurePublished (line 94) | func (r *usageReporter) ensurePublished(ctx context.Context) {
function newUsageReporter (line 29) | func newUsageReporter(ctx context.Context, provider, model string, auth ...
function apiKeyFromContext (line 113) | func apiKeyFromContext(ctx context.Context) string {
function resolveUsageSource (line 134) | func resolveUsageSource(auth *cliproxyauth.Auth, ctxAPIKey string) string {
function parseCodexUsage (line 178) | func parseCodexUsage(data []byte) (usage.Detail, bool) {
function parseOpenAIUsage (line 197) | func parseOpenAIUsage(data []byte) usage.Detail {
function parseOpenAIStreamUsage (line 232) | func parseOpenAIStreamUsage(line []byte) (usage.Detail, bool) {
function parseClaudeUsage (line 255) | func parseClaudeUsage(data []byte) usage.Detail {
function parseClaudeStreamUsage (line 273) | func parseClaudeStreamUsage(line []byte) (usage.Detail, bool) {
function parseGeminiFamilyUsageDetail (line 294) | func parseGeminiFamilyUsageDetail(node gjson.Result) usage.Detail {
function parseGeminiCLIUsage (line 308) | func parseGeminiCLIUsage(data []byte) usage.Detail {
function parseGeminiUsage (line 320) | func parseGeminiUsage(data []byte) usage.Detail {
function parseGeminiStreamUsage (line 332) | func parseGeminiStreamUsage(line []byte) (usage.Detail, bool) {
function parseGeminiCLIStreamUsage (line 347) | func parseGeminiCLIStreamUsage(line []byte) (usage.Detail, bool) {
function parseAntigravityUsage (line 362) | func parseAntigravityUsage(data []byte) usage.Detail {
function parseAntigravityStreamUsage (line 377) | func parseAntigravityStreamUsage(line []byte) (usage.Detail, bool) {
function rememberStopWithoutUsage (line 397) | func rememberStopWithoutUsage(traceID string) {
function FilterSSEUsageMetadata (line 405) | func FilterSSEUsageMetadata(payload []byte) []byte {
function StripUsageMetadataFromJSON (line 469) | func StripUsageMetadataFromJSON(rawJSON []byte) ([]byte, bool) {
function hasUsageMetadata (line 518) | func hasUsageMetadata(jsonBytes []byte) bool {
function isStopChunkWithoutUsage (line 531) | func isStopChunkWithoutUsage(jsonBytes []byte) bool {
function jsonPayload (line 546) | func jsonPayload(line []byte) []byte {
FILE: internal/runtime/executor/usage_helpers_test.go
function TestParseOpenAIUsageChatCompletions (line 5) | func TestParseOpenAIUsageChatCompletions(t *testing.T) {
function TestParseOpenAIUsageResponses (line 25) | func TestParseOpenAIUsageResponses(t *testing.T) {
FILE: internal/runtime/executor/user_id_cache.go
type userIDCacheEntry (line 10) | type userIDCacheEntry struct
constant userIDTTL (line 22) | userIDTTL = time.Hour
constant userIDCacheCleanupPeriod (line 23) | userIDCacheCleanupPeriod = 15 * time.Minute
function startUserIDCacheCleanup (line 26) | func startUserIDCacheCleanup() {
function purgeExpiredUserIDs (line 36) | func purgeExpiredUserIDs() {
function userIDCacheKey (line 47) | func userIDCacheKey(apiKey string) string {
function cachedUserID (line 52) | func cachedUserID(apiKey string) string {
FILE: internal/runtime/executor/user_id_cache_test.go
function resetUserIDCache (line 8) | func resetUserIDCache() {
function TestCachedUserID_ReusesWithinTTL (line 14) | func TestCachedUserID_ReusesWithinTTL(t *testing.T) {
function TestCachedUserID_ExpiresAfterTTL (line 28) | func TestCachedUserID_ExpiresAfterTTL(t *testing.T) {
function TestCachedUserID_IsScopedByAPIKey (line 49) | func TestCachedUserID_IsScopedByAPIKey(t *testing.T) {
function TestCachedUserID_RenewsTTLOnHit (line 60) | func TestCachedUserID_RenewsTTLOnHit(t *testing.T) {
FILE: internal/runtime/geminicli/state.go
type SharedCredential (line 9) | type SharedCredential struct
method PrimaryID (line 28) | func (s *SharedCredential) PrimaryID() string {
method Email (line 36) | func (s *SharedCredential) Email() string {
method ProjectIDs (line 44) | func (s *SharedCredential) ProjectIDs() []string {
method MetadataSnapshot (line 52) | func (s *SharedCredential) MetadataSnapshot() map[string]any {
method MergeMetadata (line 62) | func (s *SharedCredential) MergeMetadata(values map[string]any) map[st...
method SetProjectIDs (line 85) | func (s *SharedCredential) SetProjectIDs(ids []string) {
function NewSharedCredential (line 18) | func NewSharedCredential(primaryID, email string, metadata map[string]an...
type VirtualCredential (line 95) | type VirtualCredential struct
function NewVirtualCredential (line 101) | func NewVirtualCredential(projectID string, parent *SharedCredential) *V...
function ResolveSharedCredential (line 106) | func ResolveSharedCredential(runtime any) *SharedCredential {
function IsVirtual (line 118) | func IsVirtual(runtime any) bool {
function cloneMap (line 126) | func cloneMap(in map[string]any) map[string]any {
function cloneStrings (line 137) | func cloneStrings(in []string) []string {
FILE: internal/store/gitstore.go
constant gcInterval (line 25) | gcInterval = 5 * time.Minute
type GitTokenStore (line 28) | type GitTokenStore struct
method SetBaseDir (line 51) | func (s *GitTokenStore) SetBaseDir(dir string) {
method AuthDir (line 77) | func (s *GitTokenStore) AuthDir() string {
method ConfigPath (line 82) | func (s *GitTokenStore) ConfigPath() string {
method EnsureRepository (line 92) | func (s *GitTokenStore) EnsureRepository() error {
method Save (line 216) | func (s *GitTokenStore) Save(_ context.Context, auth *cliproxyauth.Aut...
method List (line 299) | func (s *GitTokenStore) List(_ context.Context) ([]*cliproxyauth.Auth,...
method Delete (line 334) | func (s *GitTokenStore) Delete(_ context.Context, id string) error {
method PersistAuthFiles (line 368) | func (s *GitTokenStore) PersistAuthFiles(_ context.Context, message st...
method resolveDeletePath (line 401) | func (s *GitTokenStore) resolveDeletePath(id string) (string, error) {
method readAuthFile (line 412) | func (s *GitTokenStore) readAuthFile(path, baseDir string) (*cliproxya...
method idFor (line 452) | func (s *GitTokenStore) idFor(path, baseDir string) string {
method resolveAuthPath (line 463) | func (s *GitTokenStore) resolveAuthPath(auth *cliproxyauth.Auth) (stri...
method labelFor (line 494) | func (s *GitTokenStore) labelFor(metadata map[string]any) string {
method baseDirSnapshot (line 510) | func (s *GitTokenStore) baseDirSnapshot() string {
method repoDirSnapshot (line 516) | func (s *GitTokenStore) repoDirSnapshot() string {
method gitAuth (line 522) | func (s *GitTokenStore) gitAuth() transport.AuthMethod {
method relativeToRepo (line 533) | func (s *GitTokenStore) relativeToRepo(path string) (string, error) {
method commitAndPushLocked (line 556) | func (s *GitTokenStore) commitAndPushLocked(message string, relPaths ....
method rewriteHeadAsSingleCommit (line 631) | func (s *GitTokenStore) rewriteHeadAsSingleCommit(repo *git.Repository...
method maybeRunGC (line 660) | func (s *GitTokenStore) maybeRunGC(repo *git.Repository) {
method PersistConfig (line 678) | func (s *GitTokenStore) PersistConfig(_ context.Context) error {
function NewGitTokenStore (line 42) | func NewGitTokenStore(remote, username, password string) *GitTokenStore {
function ensureEmptyFile (line 701) | func ensureEmptyFile(path string) error {
function jsonEqual (line 711) | func jsonEqual(a, b []byte) bool {
function deepEqualJSON (line 723) | func deepEqualJSON(a, b any) bool {
FILE: internal/store/objectstore.go
constant objectStoreConfigKey (line 26) | objectStoreConfigKey = "config/config.yaml"
constant objectStoreAuthPrefix (line 27) | objectStoreAuthPrefix = "auths"
type ObjectStoreConfig (line 31) | type ObjectStoreConfig struct
type ObjectTokenStore (line 45) | type ObjectTokenStore struct
method SetBaseDir (line 123) | func (s *ObjectTokenStore) SetBaseDir(string) {}
method ConfigPath (line 126) | func (s *ObjectTokenStore) ConfigPath() string {
method AuthDir (line 134) | func (s *ObjectTokenStore) AuthDir() string {
method Bootstrap (line 142) | func (s *ObjectTokenStore) Bootstrap(ctx context.Context, exampleConfi...
method Save (line 159) | func (s *ObjectTokenStore) Save(ctx context.Context, auth *cliproxyaut...
method List (line 229) | func (s *ObjectTokenStore) List(_ context.Context) ([]*cliproxyauth.Au...
method Delete (line 262) | func (s *ObjectTokenStore) Delete(ctx context.Context, id string) error {
method PersistAuthFiles (line 285) | func (s *ObjectTokenStore) PersistAuthFiles(ctx context.Context, _ str...
method PersistConfig (line 310) | func (s *ObjectTokenStore) PersistConfig(ctx context.Context) error {
method ensureBucket (line 327) | func (s *ObjectTokenStore) ensureBucket(ctx context.Context) error {
method syncConfigFromBucket (line 341) | func (s *ObjectTokenStore) syncConfigFromBucket(ctx context.Context, e...
method syncAuthFromBucket (line 388) | func (s *ObjectTokenStore) syncAuthFromBucket(ctx context.Context) err...
method uploadAuth (line 440) | func (s *ObjectTokenStore) uploadAuth(ctx context.Context, path string...
method deleteAuthObject (line 462) | func (s *ObjectTokenStore) deleteAuthObject(ctx context.Context, path ...
method putObject (line 474) | func (s *ObjectTokenStore) putObject(ctx context.Context, key string, ...
method deleteObject (line 489) | func (s *ObjectTokenStore) deleteObject(ctx context.Context, key strin...
method prefixedKey (line 501) | func (s *ObjectTokenStore) prefixedKey(key string) string {
method resolveAuthPath (line 509) | func (s *ObjectTokenStore) resolveAuthPath(auth *cliproxyauth.Auth) (s...
method resolveDeletePath (line 534) | func (s *ObjectTokenStore) resolveDeletePath(id string) (string, error) {
method readAuthFile (line 556) | func (s *ObjectTokenStore) readAuthFile(path, baseDir string) (*clipro...
function NewObjectTokenStore (line 55) | func NewObjectTokenStore(cfg ObjectStoreConfig) (*ObjectTokenStore, erro...
function normalizeLineEndingsBytes (line 601) | func normalizeLineEndingsBytes(data []byte) []byte {
function isObjectNotFound (line 606) | func isObjectNotFound(err error) bool {
FILE: internal/store/postgresstore.go
constant defaultConfigTable (line 23) | defaultConfigTable = "config_store"
constant defaultAuthTable (line 24) | defaultAuthTable = "auth_store"
constant defaultConfigKey (line 25) | defaultConfigKey = "config"
type PostgresStoreConfig (line 29) | type PostgresStoreConfig struct
type PostgresStore (line 39) | type PostgresStore struct
method Close (line 103) | func (s *PostgresStore) Close() error {
method EnsureSchema (line 111) | func (s *PostgresStore) EnsureSchema(ctx context.Context) error {
method Bootstrap (line 147) | func (s *PostgresStore) Bootstrap(ctx context.Context, exampleConfigPa...
method ConfigPath (line 161) | func (s *PostgresStore) ConfigPath() string {
method AuthDir (line 169) | func (s *PostgresStore) AuthDir() string {
method WorkDir (line 177) | func (s *PostgresStore) WorkDir() string {
method SetBaseDir (line 186) | func (s *PostgresStore) SetBaseDir(string) {}
method Save (line 189) | func (s *PostgresStore) Save(ctx context.Context, auth *cliproxyauth.A...
method List (line 263) | func (s *PostgresStore) List(ctx context.Context) ([]*cliproxyauth.Aut...
method Delete (line 322) | func (s *PostgresStore) Delete(ctx context.Context, id string) error {
method PersistAuthFiles (line 346) | func (s *PostgresStore) PersistAuthFiles(ctx context.Context, _ string...
method PersistConfig (line 380) | func (s *PostgresStore) PersistConfig(ctx context.Context) error {
method syncConfigFromDatabase (line 395) | func (s *PostgresStore) syncConfigFromDatabase(ctx context.Context, ex...
method syncAuthFromDatabase (line 437) | func (s *PostgresStore) syncAuthFromDatabase(ctx context.Context) error {
method syncAuthFile (line 478) | func (s *PostgresStore) syncAuthFile(ctx context.Context, relID, path ...
method upsertAuthRecord (line 492) | func (s *PostgresStore) upsertAuthRecord(ctx context.Context, relID, p...
method persistAuth (line 503) | func (s *PostgresStore) persistAuth(ctx context.Context, relID string,...
method deleteAuthRecord (line 517) | func (s *PostgresStore) deleteAuthRecord(ctx context.Context, relID st...
method persistConfig (line 525) | func (s *PostgresStore) persistConfig(ctx context.Context, data []byte...
method deleteConfigRecord (line 539) | func (s *PostgresStore) deleteConfigRecord(ctx context.Context) error {
method resolveAuthPath (line 547) | func (s *PostgresStore) resolveAuthPath(auth *cliproxyauth.Auth) (stri...
method resolveDeletePath (line 571) | func (s *PostgresStore) resolveDeletePath(id string) (string, error) {
method relativeAuthID (line 578) | func (s *PostgresStore) relativeAuthID(path string) (string, error) {
method absoluteAuthPath (line 596) | func (s *PostgresStore) absoluteAuthPath(id string) (string, error) {
method fullTableName (line 615) | func (s *PostgresStore) fullTableName(name string) string {
function NewPostgresStore (line 49) | func NewPostgresStore(ctx context.Context, cfg PostgresStoreConfig) (*Po...
function quoteIdentifier (line 622) | func quoteIdentifier(identifier string) string {
function valueAsString (line 627) | func valueAsString(v any) string {
function labelFor (line 638) | func labelFor(metadata map[string]any) string {
function normalizeAuthID (line 654) | func normalizeAuthID(id string) string {
function normalizeLineEndings (line 658) | func normalizeLineEndings(s string) string {
FILE: internal/thinking/apply.go
function GetProviderApplier (line 26) | func GetProviderApplier(provider string) ProviderApplier {
function RegisterProvider (line 31) | func RegisterProvider(name string, applier ProviderApplier) {
function IsUserDefinedModel (line 44) | func IsUserDefinedModel(modelInfo *registry.ModelInfo) bool {
function ApplyThinking (line 88) | func ApplyThinking(body []byte, model string, fromFormat string, toForma...
function parseSuffixToConfig (line 211) | func parseSuffixToConfig(rawSuffix, provider, model string) ThinkingConf...
function applyUserDefinedModel (line 246) | func applyUserDefinedModel(body []byte, modelInfo *registry.ModelInfo, f...
function normalizeUserDefinedConfig (line 295) | func normalizeUserDefinedConfig(config ThinkingConfig, fromFormat, toFor...
function extractThinkingConfig (line 316) | func extractThinkingConfig(body []byte, provider string) ThinkingConfig {
function hasThinkingConfig (line 344) | func hasThinkingConfig(config ThinkingConfig) bool {
function extractClaudeConfig (line 357) | func extractClaudeConfig(body []byte) ThinkingConfig {
function extractGeminiConfig (line 414) | func extractGeminiConfig(body []byte, provider string) ThinkingConfig {
function extractOpenAIConfig (line 466) | func extractOpenAIConfig(body []byte) ThinkingConfig {
function extractCodexConfig (line 485) | func extractCodexConfig(body []byte) ThinkingConfig {
function extractIFlowConfig (line 507) | func extractIFlowConfig(body []byte) ThinkingConfig {
FILE: internal/thinking/apply_user_defined_test.go
function TestApplyThinking_UserDefinedClaudePreservesAdaptiveLevel (line 12) | func TestApplyThinking_UserDefinedClaudePreservesAdaptiveLevel(t *testin...
FILE: internal/thinking/convert.go
function ConvertLevelToBudget (line 42) | func ConvertLevelToBudget(level string) (int, bool) {
constant ThresholdMinimal (line 51) | ThresholdMinimal = 512
constant ThresholdLow (line 53) | ThresholdLow = 1024
constant ThresholdMedium (line 55) | ThresholdMedium = 8192
constant ThresholdHigh (line 57) | ThresholdHigh = 24576
function ConvertBudgetToLevel (line 77) | func ConvertBudgetToLevel(budget int) (string, bool) {
function HasLevel (line 101) | func HasLevel(levels []string, target string) bool {
function MapToClaudeEffort (line 115) | func MapToClaudeEffort(level string, supportsMax bool) (string, bool) {
type ModelCapability (line 137) | type ModelCapability
constant CapabilityUnknown (line 141) | CapabilityUnknown ModelCapability = iota - 1
constant CapabilityNone (line 143) | CapabilityNone
constant CapabilityBudgetOnly (line 145) | CapabilityBudgetOnly
constant CapabilityLevelOnly (line 147) | CapabilityLevelOnly
constant CapabilityHybrid (line 149) | CapabilityHybrid
function detectModelCapability (line 162) | func detectModelCapability(modelInfo *registry.ModelInfo) ModelCapability {
FILE: internal/thinking/errors.go
type ErrorCode (line 7) | type ErrorCode
constant ErrInvalidSuffix (line 13) | ErrInvalidSuffix ErrorCode = "INVALID_SUFFIX"
constant ErrUnknownLevel (line 17) | ErrUnknownLevel ErrorCode = "UNKNOWN_LEVEL"
constant ErrThinkingNotSupported (line 21) | ErrThinkingNotSupported ErrorCode = "THINKING_NOT_SUPPORTED"
constant ErrLevelNotSupported (line 25) | ErrLevelNotSupported ErrorCode = "LEVEL_NOT_SUPPORTED"
constant ErrBudgetOutOfRange (line 29) | ErrBudgetOutOfRange ErrorCode = "BUDGET_OUT_OF_RANGE"
constant ErrProviderMismatch (line 33) | ErrProviderMismatch ErrorCode = "PROVIDER_MISMATCH"
type ThinkingError (line 43) | type ThinkingError struct
method Error (line 58) | func (e *ThinkingError) Error() string {
method StatusCode (line 80) | func (e *ThinkingError) StatusCode() int {
function NewThinkingError (line 63) | func NewThinkingError(code ErrorCode, message string) *ThinkingError {
function NewThinkingErrorWithModel (line 71) | func NewThinkingErrorWithModel(code ErrorCode, message, model string) *T...
FILE: internal/thinking/provider/antigravity/apply.go
type Applier (line 19) | type Applier struct
method Apply (line 37) | func (a *Applier) Apply(body []byte, config thinking.ThinkingConfig, m...
method applyCompatible (line 71) | func (a *Applier) applyCompatible(body []byte, config thinking.Thinkin...
method applyLevelFormat (line 96) | func (a *Applier) applyLevelFormat(body []byte, config thinking.Thinki...
method applyBudgetFormat (line 132) | func (a *Applier) applyBudgetFormat(body []byte, config thinking.Think...
method normalizeClaudeBudget (line 195) | func (a *Applier) normalizeClaudeBudget(budget int, payload []byte, mo...
method effectiveMaxTokens (line 228) | func (a *Applier) effectiveMaxTokens(payload []byte, modelInfo *regist...
function NewApplier (line 24) | func NewApplier() *Applier {
function init (line 28) | func init() {
FILE: internal/thinking/provider/claude/apply.go
type Applier (line 20) | type Applier struct
method Apply (line 72) | func (a *Applier) Apply(body []byte, config thinking.ThinkingConfig, m...
method normalizeClaudeBudget (line 169) | func (a *Applier) normalizeClaudeBudget(body []byte, budgetTokens int,...
method effectiveMaxTokens (line 211) | func (a *Applier) effectiveMaxTokens(body []byte, modelInfo *registry....
function NewApplier (line 23) | func NewApplier() *Applier {
function init (line 27) | func init() {
function applyCompatibleClaude (line 221) | func applyCompatibleClaude(body []byte, config thinking.ThinkingConfig) ...
FILE: internal/thinking/provider/codex/apply.go
type Applier (line 22) | type Applier struct
method Apply (line 44) | func (a *Applier) Apply(body []byte, config thinking.ThinkingConfig, m...
function NewApplier (line 27) | func NewApplier() *Applier {
function init (line 31) | func init() {
function applyCompatibleCodex (line 87) | func applyCompatibleCodex(body []byte, config thinking.ThinkingConfig) (...
FILE: internal/thinking/provider/gemini/apply.go
type Applier (line 27) | type Applier struct
method Apply (line 61) | func (a *Applier) Apply(body []byte, config thinking.ThinkingConfig, m...
method applyCompatible (line 95) | func (a *Applier) applyCompatible(body []byte, config thinking.Thinkin...
method applyLevelFormat (line 115) | func (a *Applier) applyLevelFormat(body []byte, config thinking.Thinki...
method applyBudgetFormat (line 156) | func (a *Applier) applyBudgetFormat(body []byte, config thinking.Think...
function NewApplier (line 30) | func NewApplier() *Applier {
function init (line 34) | func init() {
FILE: internal/thinking/provider/geminicli/apply.go
type Applier (line 15) | type Applier struct
method Apply (line 29) | func (a *Applier) Apply(body []byte, config thinking.ThinkingConfig, m...
method applyCompatible (line 61) | func (a *Applier) applyCompatible(body []byte, config thinking.Thinkin...
method applyLevelFormat (line 81) | func (a *Applier) applyLevelFormat(body []byte, config thinking.Thinki...
method applyBudgetFormat (line 117) | func (a *Applier) applyBudgetFormat(body []byte, config thinking.Think...
function NewApplier (line 20) | func NewApplier() *Applier {
function init (line 24) | func init() {
FILE: internal/thinking/provider/iflow/apply.go
type Applier (line 28) | type Applier struct
method Apply (line 57) | func (a *Applier) Apply(body []byte, config thinking.ThinkingConfig, m...
function NewApplier (line 33) | func NewApplier() *Applier {
function init (line 37) | func init() {
function configToBoolean (line 86) | func configToBoolean(config thinking.ThinkingConfig) bool {
function applyEnableThinking (line 113) | func applyEnableThinking(body []byte, config thinking.ThinkingConfig, se...
function applyMiniMax (line 138) | func applyMiniMax(body []byte, config thinking.ThinkingConfig) []byte {
function isEnableThinkingModel (line 151) | func isEnableThinkingModel(modelID string) bool {
function isGLMModel (line 165) | func isGLMModel(modelID string) bool {
function isMiniMaxModel (line 171) | func isMiniMaxModel(modelID string) bool {
FILE: internal/thinking/provider/kimi/apply.go
type Applier (line 22) | type Applier struct
method Apply (line 50) | func (a *Applier) Apply(body []byte, config thinking.ThinkingConfig, m...
function NewApplier (line 27) | func NewApplier() *Applier {
function init (line 31) | func init() {
function applyCompatibleKimi (line 98) | func applyCompatibleKimi(body []byte, config thinking.ThinkingConfig) ([...
function applyReasoningEffort (line 133) | func applyReasoningEffort(body []byte, effort string) ([]byte, error) {
function applyDisabledThinking (line 145) | func applyDisabledThinking(body []byte) ([]byte, error) {
FILE: internal/thinking/provider/kimi/apply_test.go
function TestApply_ModeNone_UsesDisabledThinking (line 11) | func TestApply_ModeNone_UsesDisabledThinking(t *testing.T) {
function TestApply_ModeLevel_UsesReasoningEffort (line 34) | func TestApply_ModeLevel_UsesReasoningEffort(t *testing.T) {
function TestApply_UserDefinedModeNone_UsesDisabledThinking (line 54) | func TestApply_UserDefinedModeNone_UsesDisabledThinking(t *testing.T) {
FILE: internal/thinking/provider/openai/apply.go
type Applier (line 21) | type Applier struct
method Apply (line 41) | func (a *Applier) Apply(body []byte, config thinking.ThinkingConfig, m...
function NewApplier (line 26) | func NewApplier() *Applier {
function init (line 30) | func init() {
function applyCompatibleOpenAI (line 84) | func applyCompatibleOpenAI(body []byte, config thinking.ThinkingConfig) ...
FILE: internal/thinking/strip.go
function StripThinkingConfig (line 25) | func StripThinkingConfig(body []byte, provider string) []byte {
FILE: internal/thinking/suffix.go
function ParseSuffix (line 23) | func ParseSuffix(model string) SuffixResult {
function ParseNumericSuffix (line 66) | func ParseNumericSuffix(rawSuffix string) (budget int, ok bool) {
function ParseSpecialSuffix (line 93) | func ParseSpecialSuffix(rawSuffix string) (mode ThinkingMode, ok bool) {
function ParseLevelSuffix (line 126) | func ParseLevelSuffix(rawSuffix string) (level ThinkingLevel, ok bool) {
FILE: internal/thinking/text.go
function GetThinkingText (line 13) | func GetThinkingText(part gjson.Result) string {
FILE: internal/thinking/types.go
type ThinkingMode (line 10) | type ThinkingMode
method String (line 24) | func (m ThinkingMode) String() string {
constant ModeBudget (line 14) | ModeBudget ThinkingMode = iota
constant ModeLevel (line 16) | ModeLevel
constant ModeNone (line 18) | ModeNone
constant ModeAuto (line 20) | ModeAuto
type ThinkingLevel (line 40) | type ThinkingLevel
constant LevelNone (line 44) | LevelNone ThinkingLevel = "none"
constant LevelAuto (line 46) | LevelAuto ThinkingLevel = "auto"
constant LevelMinimal (line 48) | LevelMinimal ThinkingLevel = "minimal"
constant LevelLow (line 50) | LevelLow ThinkingLevel = "low"
constant LevelMedium (line 52) | LevelMedium ThinkingLevel = "medium"
constant LevelHigh (line 54) | LevelHigh ThinkingLevel = "high"
constant LevelXHigh (line 56) | LevelXHigh ThinkingLevel = "xhigh"
constant LevelMax (line 59) | LevelMax ThinkingLevel = "max"
type ThinkingConfig (line 70) | type ThinkingConfig struct
type SuffixResult (line 84) | type SuffixResult struct
type ProviderApplier (line 107) | type ProviderApplier interface
FILE: internal/thinking/validate.go
function ValidateConfig (line 38) | func ValidateConfig(config ThinkingConfig, modelInfo *registry.ModelInfo...
function convertAutoToMidRange (line 177) | func convertAutoToMidRange(config ThinkingConfig, support *registry.Thin...
function clampLevel (line 218) | func clampLevel(level ThinkingLevel, modelInfo *registry.ModelInfo, prov...
function clampBudget (line 262) | func clampBudget(value int, modelInfo *registry.ModelInfo, provider stri...
function isLevelSupported (line 312) | func isLevelSupported(level string, supported []string) bool {
function levelIndex (line 321) | func levelIndex(level string) int {
function normalizeLevels (line 330) | func normalizeLevels(levels []string) []string {
function isBudgetCapableProvider (line 340) | func isBudgetCapableProvider(provider string) bool {
function isGeminiFamily (line 349) | func isGeminiFamily(provider string) bool {
function isOpenAIFamily (line 358) | func isOpenAIFamily(provider string) bool {
function isSameProviderFamily (line 367) | func isSameProviderFamily(from, to string) bool {
function abs (line 375) | func abs(x int) int {
function logClamp (line 382) | func logClamp(provider, model string, original, clampedTo, min, max int) {
FILE: internal/translator/antigravity/claude/antigravity_claude_request.go
function ConvertClaudeRequestToAntigravity (line 38) | func ConvertClaudeRequestToAntigravity(modelName string, inputRawJSON []...
FILE: internal/translator/antigravity/claude/antigravity_claude_request_test.go
function TestConvertClaudeRequestToAntigravity_BasicStructure (line 11) | func TestConvertClaudeRequestToAntigravity_BasicStructure(t *testing.T) {
function TestConvertClaudeRequestToAntigravity_RoleMapping (line 57) | func TestConvertClaudeRequestToAntigravity_RoleMapping(t *testing.T) {
function TestConvertClaudeRequestToAntigravity_ThinkingBlocks (line 76) | func TestConvertClaudeRequestToAntigravity_ThinkingBlocks(t *testing.T) {
function TestConvertClaudeRequestToAntigravity_ThinkingBlockWithoutSignature (line 119) | func TestConvertClaudeRequestToAntigravity_ThinkingBlockWithoutSignature...
function TestConvertClaudeRequestToAntigravity_ToolDeclarations (line 154) | func TestConvertClaudeRequestToAntigravity_ToolDeclarations(t *testing.T) {
function TestConvertClaudeRequestToAntigravity_ToolChoice_SpecificTool (line 196) | func TestConvertClaudeRequestToAntigravity_ToolChoice_SpecificTool(t *te...
function TestConvertClaudeRequestToAntigravity_ToolUse (line 232) | func TestConvertClaudeRequestToAntigravity_ToolUse(t *testing.T) {
function TestConvertClaudeRequestToAntigravity_ToolUse_WithSignature (line 278) | func TestConvertClaudeRequestToAntigravity_ToolUse_WithSignature(t *test...
function TestConvertClaudeRequestToAntigravity_ReorderThinking (line 321) | func TestConvertClaudeRequestToAntigravity_ReorderThinking(t *testing.T) {
function TestConvertClaudeRequestToAntigravity_ToolResult (line 364) | func TestConvertClaudeRequestToAntigravity_ToolResult(t *testing.T) {
function TestConvertClaudeRequestToAntigravity_ToolResultName_TouluFormat (line 408) | func TestConvertClaudeRequestToAntigravity_ToolResultName_TouluFormat(t ...
function TestConvertClaudeRequestToAntigravity_ToolResultName_CustomFormat (line 467) | func TestConvertClaudeRequestToAntigravity_ToolResultName_CustomFormat(t...
function TestConvertClaudeRequestToAntigravity_ToolResultName_NoMatchingToolUse_Heuristic (line 507) | func TestConvertClaudeRequestToAntigravity_ToolResultName_NoMatchingTool...
function TestConvertClaudeRequestToAntigravity_ToolResultName_NoMatchingToolUse_RawID (line 536) | func TestConvertClaudeRequestToAntigravity_ToolResultName_NoMatchingTool...
function TestConvertClaudeRequestToAntigravity_ThinkingConfig (line 569) | func TestConvertClaudeRequestToAntigravity_ThinkingConfig(t *testing.T) {
function TestConvertClaudeRequestToAntigravity_ImageContent (line 599) | func TestConvertClaudeRequestToAntigravity_ImageContent(t *testing.T) {
function TestConvertClaudeRequestToAntigravity_GenerationConfig (line 635) | func TestConvertClaudeRequestToAntigravity_GenerationConfig(t *testing.T) {
function TestConvertClaudeRequestToAntigravity_TrailingUnsignedThinking_Removed (line 667) | func TestConvertClaudeRequestToAntigravity_TrailingUnsignedThinking_Remo...
function TestConvertClaudeRequestToAntigravity_TrailingSignedThinking_Kept (line 706) | func TestConvertClaudeRequestToAntigravity_TrailingSignedThinking_Kept(t...
function TestConvertClaudeRequestToAntigravity_MiddleUnsignedThinking_Removed (line 743) | func TestConvertClaudeRequestToAntigravity_MiddleUnsignedThinking_Remove...
function TestConvertClaudeRequestToAntigravity_ToolAndThinking_HintInjected (line 784) | func TestConvertClaudeRequestToAntigravity_ToolAndThinking_HintInjected(...
function TestConvertClaudeRequestToAntigravity_ToolsOnly_NoHint (line 823) | func TestConvertClaudeRequestToAntigravity_ToolsOnly_NoHint(t *testing.T) {
function TestConvertClaudeRequestToAntigravity_ThinkingOnly_NoHint (line 852) | func TestConvertClaudeRequestToAntigravity_ThinkingOnly_NoHint(t *testin...
function TestConvertClaudeRequestToAntigravity_ToolResultNoContent (line 875) | func TestConvertClaudeRequestToAntigravity_ToolResultNoContent(t *testin...
function TestConvertClaudeRequestToAntigravity_ToolResultNullContent (line 917) | func TestConvertClaudeRequestToAntigravity_ToolResultNullContent(t *test...
function TestConvertClaudeRequestToAntigravity_ToolResultWithImage (line 954) | func TestConvertClaudeRequestToAntigravity_ToolResultWithImage(t *testin...
function TestConvertClaudeRequestToAntigravity_ToolResultWithSingleImage (line 1025) | func TestConvertClaudeRequestToAntigravity_ToolResultWithSingleImage(t *...
function TestConvertClaudeRequestToAntigravity_ToolResultWithMultipleImagesAndTexts (line 1084) | func TestConvertClaudeRequestToAntigravity_ToolResultWithMultipleImagesA...
function TestConvertClaudeRequestToAntigravity_ToolResultWithOnlyMultipleImages (line 1161) | func TestConvertClaudeRequestToAntigravity_ToolResultWithOnlyMultipleIma...
function TestConvertClaudeRequestToAntigravity_ToolResultImageNotBase64 (line 1224) | func TestConvertClaudeRequestToAntigravity_ToolResultImageNotBase64(t *t...
function TestConvertClaudeRequestToAntigravity_ToolResultImageMissingData (line 1277) | func TestConvertClaudeRequestToAntigravity_ToolResultImageMissingData(t ...
function TestConvertClaudeRequestToAntigravity_ToolResultImageMissingMediaType (line 1327) | func TestConvertClaudeRequestToAntigravity_ToolResultImageMissingMediaTy...
function TestConvertClaudeRequestToAntigravity_ToolAndThinking_NoExistingSystem (line 1377) | func TestConvertClaudeRequestToAntigravity_ToolAndThinking_NoExistingSys...
FILE: internal/translator/antigravity/claude/antigravity_claude_response.go
type Params (line 28) | type Params struct
function ConvertAntigravityResponseToClaude (line 67) | func ConvertAntigravityResponseToClaude(_ context.Context, _ string, ori...
function appendFinalEvents (line 302) | func appendFinalEvents(params *Params, output *string, force bool) {
function resolveStopReason (line 348) | func resolveStopReason(params *Params) string {
function ConvertAntigravityResponseToClaudeNonStream (line 373) | func ConvertAntigravityResponseToClaudeNonStream(_ context.Context, _ st...
function ClaudeTokenCount (line 522) | func ClaudeTokenCount(ctx context.Context, count int64) string {
FILE: internal/translator/antigravity/claude/antigravity_claude_response_test.go
function TestConvertAntigravityResponseToClaude_ParamsInitialized (line 15) | func TestConvertAntigravityResponseToClaude_ParamsInitialized(t *testing...
function TestConvertAntigravityResponseToClaude_ThinkingTextAccumulated (line 49) | func TestConvertAntigravityResponseToClaude_ThinkingTextAccumulated(t *t...
function TestConvertAntigravityResponseToClaude_SignatureCached (line 98) | func TestConvertAntigravityResponseToClaude_SignatureCached(t *testing.T) {
function TestConvertAntigravityResponseToClaude_MultipleThinkingBlocks (line 156) | func TestConvertAntigravityResponseToClaude_MultipleThinkingBlocks(t *te...
FILE: internal/translator/antigravity/claude/init.go
function init (line 9) | func init() {
FILE: internal/translator/antigravity/gemini/antigravity_gemini_request.go
function ConvertGeminiRequestToAntigravity (line 35) | func ConvertGeminiRequestToAntigravity(modelName string, inputRawJSON []...
type FunctionCallGroup (line 139) | type FunctionCallGroup struct
function parseFunctionResponseRaw (line 147) | func parseFunctionResponseRaw(response gjson.Result, fallbackName string...
function fixCLIToolResponse (line 195) | func fixCLIToolResponse(input string) (string, error) {
FILE: internal/translator/antigravity/gemini/antigravity_gemini_request_test.go
function TestConvertGeminiRequestToAntigravity_PreserveValidSignature (line 10) | func TestConvertGeminiRequestToAntigravity_PreserveValidSignature(t *tes...
function TestConvertGeminiRequestToAntigravity_AddSkipSentinelToFunctionCall (line 40) | func TestConvertGeminiRequestToAntigravity_AddSkipSentinelToFunctionCall...
function TestConvertGeminiRequestToAntigravity_ParallelFunctionCalls (line 65) | func TestConvertGeminiRequestToAntigravity_ParallelFunctionCalls(t *test...
function TestFixCLIToolResponse_PreservesFunctionResponseParts (line 97) | func TestFixCLIToolResponse_PreservesFunctionResponseParts(t *testing.T) {
function TestFixCLIToolResponse_BackfillsEmptyFunctionResponseName (line 175) | func TestFixCLIToolResponse_BackfillsEmptyFunctionResponseName(t *testin...
function TestFixCLIToolResponse_BackfillsMultipleEmptyNames (line 221) | func TestFixCLIToolResponse_BackfillsMultipleEmptyNames(t *testing.T) {
function TestFixCLIToolResponse_PreservesExistingName (line 277) | func TestFixCLIToolResponse_PreservesExistingName(t *testing.T) {
function TestFixCLIToolResponse_MoreResponsesThanCalls (line 322) | func TestFixCLIToolResponse_MoreResponsesThanCalls(t *testing.T) {
function TestFixCLIToolResponse_MultipleGroupsFIFO (line 369) | func TestFixCLIToolResponse_MultipleGroupsFIFO(t *testing.T) {
FILE: internal/translator/antigravity/gemini/antigravity_gemini_response.go
function ConvertAntigravityResponseToGemini (line 33) | func ConvertAntigravityResponseToGemini(ctx context.Context, _ string, o...
function ConvertAntigravityResponseToGeminiNonStream (line 77) | func ConvertAntigravityResponseToGeminiNonStream(_ context.Context, _ st...
function GeminiTokenCount (line 86) | func GeminiTokenCount(ctx context.Context, count int64) string {
function restoreUsageMetadata (line 94) | func restoreUsageMetadata(chunk []byte) []byte {
FILE: internal/translator/antigravity/gemini/antigravity_gemini_response_test.go
function TestRestoreUsageMetadata (line 8) | func TestRestoreUsageMetadata(t *testing.T) {
function TestConvertAntigravityResponseToGeminiNonStream (line 41) | func TestConvertAntigravityResponseToGeminiNonStream(t *testing.T) {
function TestConvertAntigravityResponseToGeminiStream (line 69) | func TestConvertAntigravityResponseToGeminiStream(t *testing.T) {
FILE: internal/translator/antigravity/gemini/init.go
function init (line 9) | func init() {
FILE: internal/translator/antigravity/openai/chat-completions/antigravity_openai_request.go
constant geminiCLIFunctionThoughtSignature (line 17) | geminiCLIFunctionThoughtSignature = "skip_thought_signature_validator"
function ConvertOpenAIRequestToAntigravity (line 29) | func ConvertOpenAIRequestToAntigravity(modelName string, inputRawJSON []...
function itoa (line 449) | func itoa(i int) string { return fmt.Sprintf("%d", i) }
FILE: internal/translator/antigravity/openai/chat-completions/antigravity_openai_response.go
type convertCliResponseToOpenAIChatParams (line 24) | type convertCliResponseToOpenAIChatParams struct
function ConvertAntigravityResponseToOpenAI (line 48) | func ConvertAntigravityResponseToOpenAI(_ context.Context, _ string, ori...
function ConvertAntigravityResponseToOpenAINonStream (line 235) | func ConvertAntigravityResponseToOpenAINonStream(ctx context.Context, mo...
FILE: internal/translator/antigravity/openai/chat-completions/antigravity_openai_response_test.go
function TestFinishReasonToolCallsNotOverwritten (line 10) | func TestFinishReasonToolCallsNotOverwritten(t *testing.T) {
function TestFinishReasonStopForNormalText (line 48) | func TestFinishReasonStopForNormalText(t *testing.T) {
function TestFinishReasonMaxTokens (line 67) | func TestFinishReasonMaxTokens(t *testing.T) {
function TestToolCallTakesPriorityOverMaxTokens (line 86) | func TestToolCallTakesPriorityOverMaxTokens(t *testing.T) {
function TestNoFinishReasonOnIntermediateChunks (line 105) | func TestNoFinishReasonOnIntermediateChunks(t *testing.T) {
FILE: internal/translator/antigravity/openai/chat-completions/init.go
function init (line 9) | func init() {
FILE: internal/translator/antigravity/openai/responses/antigravity_openai-responses_request.go
function ConvertOpenAIResponsesRequestToAntigravity (line 8) | func ConvertOpenAIResponsesRequestToAntigravity(modelName string, inputR...
FILE: internal/translator/antigravity/openai/responses/antigravity_openai-responses_response.go
function ConvertAntigravityResponseToOpenAIResponses (line 10) | func ConvertAntigravityResponseToOpenAIResponses(ctx context.Context, mo...
function ConvertAntigravityResponseToOpenAIResponsesNonStream (line 18) | func ConvertAntigravityResponseToOpenAIResponsesNonStream(ctx context.Co...
FILE: internal/translator/antigravity/openai/responses/init.go
function init (line 9) | func init() {
FILE: internal/translator/claude/gemini-cli/claude_gemini-cli_request.go
function ConvertGeminiCLIRequestToClaude (line 30) | func ConvertGeminiCLIRequestToClaude(modelName string, inputRawJSON []by...
FILE: internal/translator/claude/gemini-cli/claude_gemini-cli_response.go
function ConvertClaudeResponseToGeminiCLI (line 27) | func ConvertClaudeResponseToGeminiCLI(ctx context.Context, modelName str...
function ConvertClaudeResponseToGeminiCLINonStream (line 51) | func ConvertClaudeResponseToGeminiCLINonStream(ctx context.Context, mode...
function GeminiCLITokenCount (line 59) | func GeminiCLITokenCount(ctx context.Context, count int64) string {
FILE: internal/translator/claude/gemini-cli/init.go
function init (line 9) | func init() {
FILE: internal/translator/claude/gemini/claude_gemini_request.go
function ConvertGeminiRequestToClaude (line 48) | func ConvertGeminiRequestToClaude(modelName string, inputRawJSON []byte,...
FILE: internal/translator/claude/gemini/claude_gemini_response.go
type ConvertAnthropicResponseToGeminiParams (line 29) | type ConvertAnthropicResponseToGeminiParams struct
function ConvertClaudeResponseToGemini (line 56) | func ConvertClaudeResponseToGemini(_ context.Context, modelName string, ...
function ConvertClaudeResponseToGeminiNonStream (line 279) | func ConvertClaudeResponseToGeminiNonStream(_ context.Context, modelName...
function GeminiTokenCount (line 488) | func GeminiTokenCount(ctx context.Context, count int64) string {
function consolidateParts (line 496) | func consolidateParts(parts []string) []string {
FILE: internal/translator/claude/gemini/init.go
function init (line 9) | func init() {
FILE: internal/translator/claude/openai/chat-completions/claude_openai_request.go
function ConvertOpenAIRequestToClaude (line 46) | func ConvertOpenAIRequestToClaude(modelName string, inputRawJSON []byte,...
function convertOpenAIContentPartToClaudePart (line 330) | func convertOpenAIContentPartToClaudePart(part gjson.Result) string {
function convertOpenAIImageURLToClaudePart (line 359) | func convertOpenAIImageURLToClaudePart(imageURL string) string {
function convertOpenAIToolResultContent (line 387) | func convertOpenAIToolResultContent(content gjson.Result) (string, bool) {
FILE: internal/translator/claude/openai/chat-completions/claude_openai_request_test.go
function TestConvertOpenAIRequestToClaude_ToolResultTextAndBase64Image (line 9) | func TestConvertOpenAIRequestToClaude_ToolResultTextAndBase64Image(t *te...
function TestConvertOpenAIRequestToClaude_ToolResultURLImageOnly (line 83) | func TestConvertOpenAIRequestToClaude_ToolResultURLImageOnly(t *testing....
FILE: internal/translator/claude/openai/chat-completions/claude_openai_response.go
type ConvertAnthropicResponseToOpenAIParams (line 24) | type ConvertAnthropicResponseToOpenAIParams struct
type ToolCallAccumulator (line 33) | type ToolCallAccumulator struct
function ConvertClaudeResponseToOpenAI (line 52) | func ConvertClaudeResponseToOpenAI(_ context.Context, modelName string, ...
function mapAnthropicStopReasonToOpenAI (line 242) | func mapAnthropicStopReasonToOpenAI(anthropicReason string) string {
function ConvertClaudeResponseToOpenAINonStream (line 270) | func ConvertClaudeResponseToOpenAINonStream(_ context.Context, _ string,...
FILE: internal/translator/claude/openai/chat-completions/init.go
function init (line 9) | func init() {
FILE: internal/translator/claude/openai/responses/claude_openai-responses_request.go
function ConvertOpenAIResponsesRequestToClaude (line 34) | func ConvertOpenAIResponsesRequestToClaude(modelName string, inputRawJSO...
FILE: internal/translator/claude/openai/responses/claude_openai-responses_response.go
type claudeToResponsesState (line 15) | type claudeToResponsesState struct
function pickRequestJSON (line 43) | func pickRequestJSON(originalRequestRawJSON, requestRawJSON []byte) []by...
function emitEvent (line 53) | func emitEvent(event string, payload string) string {
function ConvertClaudeResponseToOpenAIResponses (line 58) | func ConvertClaudeResponseToOpenAIResponses(ctx context.Context, modelNa...
function ConvertClaudeResponseToOpenAIResponsesNonStream (line 435) | func ConvertClaudeResponseToOpenAIResponsesNonStream(_ context.Context, ...
FILE: internal/translator/claude/openai/responses/init.go
function init (line 9) | func init() {
FILE: internal/translator/codex/claude/codex_claude_request.go
function ConvertClaudeRequestToCodex (line 36) | func ConvertClaudeRequestToCodex(modelName string, inputRawJSON []byte, ...
function shortenNameIfNeeded (line 316) | func shortenNameIfNeeded(name string) string {
function buildShortNameMap (line 335) | func buildShortNameMap(names []string) map[string]string {
function buildReverseMapFromClaudeOriginalToShort (line 389) | func buildReverseMapFromClaudeOriginalToShort(original []byte) map[strin...
function normalizeToolParameters (line 410) | func normalizeToolParameters(raw string) string {
FILE: internal/translator/codex/claude/codex_claude_request_test.go
function TestConvertClaudeRequestToCodex_SystemMessageScenarios (line 9) | func TestConvertClaudeRequestToCodex_SystemMessageScenarios(t *testing.T) {
FILE: internal/translator/codex/claude/codex_claude_response.go
type ConvertCodexResponseToClaudeParams (line 25) | type ConvertCodexResponseToClaudeParams struct
function ConvertCodexResponseToClaude (line 47) | func ConvertCodexResponseToClaude(_ context.Context, _ string, originalR...
function ConvertCodexResponseToClaudeNonStream (line 218) | func ConvertCodexResponseToClaudeNonStream(_ context.Context, _ string, ...
function extractResponsesUsage (line 345) | func extractResponsesUsage(usage gjson.Result) (int64, int64, int64) {
function buildReverseMapFromClaudeOriginalShortToOriginal (line 366) | func buildReverseMapFromClaudeOriginalShortToOriginal(original []byte) m...
function ClaudeTokenCount (line 389) | func ClaudeTokenCount(ctx context.Context, count int64) string {
FILE: internal/translator/codex/claude/init.go
function init (line 9) | func init() {
FILE: internal/translator/codex/gemini-cli/codex_gemini-cli_request.go
function ConvertGeminiCLIRequestToCodex (line 30) | func ConvertGeminiCLIRequestToCodex(modelName string, inputRawJSON []byt...
FILE: internal/translator/codex/gemini-cli/codex_gemini-cli_response.go
function ConvertCodexResponseToGeminiCLI (line 28) | func ConvertCodexResponseToGeminiCLI(ctx context.Context, modelName stri...
function ConvertCodexResponseToGeminiCLINonStream (line 51) | func ConvertCodexResponseToGeminiCLINonStream(ctx context.Context, model...
function GeminiCLITokenCount (line 59) | func GeminiCLITokenCount(ctx context.Context, count int64) string {
FILE: internal/translator/codex/gemini-cli/init.go
function init (line 9) | func init() {
FILE: internal/translator/codex/gemini/codex_gemini_request.go
function ConvertGeminiRequestToCodex (line 38) | func ConvertGeminiRequestToCodex(modelName string, inputRawJSON []byte, ...
function shortenNameIfNeeded (line 294) | func shortenNameIfNeeded(name string) string {
function buildShortNameMap (line 313) | func buildShortNameMap(names []string) map[string]string {
FILE: internal/translator/codex/gemini/codex_gemini_response.go
type ConvertCodexResponseToGeminiParams (line 22) | type ConvertCodexResponseToGeminiParams struct
function ConvertCodexResponseToGemini (line 42) | func ConvertCodexResponseToGemini(_ context.Context, modelName string, o...
function ConvertCodexResponseToGeminiNonStream (line 153) | func ConvertCodexResponseToGeminiNonStream(_ context.Context, modelName ...
function buildReverseMapFromGeminiOriginal (line 282) | func buildReverseMapFromGeminiOriginal(original []byte) map[string]string {
function GeminiTokenCount (line 310) | func GeminiTokenCount(ctx context.Context, count int64) string {
FILE: internal/translator/codex/gemini/init.go
function init (line 9) | func init() {
FILE: internal/translator/codex/openai/chat-completions/codex_openai_request.go
function ConvertOpenAIRequestToCodex (line 29) | func ConvertOpenAIRequestToCodex(modelName string, inputRawJSON []byte, ...
function shortenNameIfNeeded (line 365) | func shortenNameIfNeeded(name string) string {
function buildShortNameMap (line 387) | func buildShortNameMap(names []string) map[string]string {
FILE: internal/translator/codex/openai/chat-completions/codex_openai_request_test.go
function TestToolCallSimple (line 12) | func TestToolCallSimple(t *testing.T) {
function TestToolCallWithContent (line 102) | func TestToolCallWithContent(t *testing.T) {
function TestMultipleToolCalls (line 181) | func TestMultipleToolCalls(t *testing.T) {
function TestNoSpuriousEmptyAssistantMessage (line 273) | func TestNoSpuriousEmptyAssistantMessage(t *testing.T) {
function TestMultiTurnToolCalling (line 335) | func TestMultiTurnToolCalling(t *testing.T) {
function TestToolNameShortening (line 413) | func TestToolNameShortening(t *testing.T) {
function TestEmptyStringContent (line 485) | func TestEmptyStringContent(t *testing.T) {
function TestCallIDsMatchBetweenCallAndOutput (line 535) | func TestCallIDsMatchBetweenCallAndOutput(t *testing.T) {
function TestToolsDefinitionTranslated (line 599) | func TestToolsDefinitionTranslated(t *testing.T) {
FILE: internal/translator/codex/openai/chat-completions/codex_openai_response.go
type ConvertCliToOpenAIParams (line 22) | type ConvertCliToOpenAIParams struct
function ConvertCodexResponseToOpenAI (line 45) | func ConvertCodexResponseToOpenAI(_ context.Context, modelName string, o...
function ConvertCodexResponseToOpenAINonStream (line 237) | func ConvertCodexResponseToOpenAINonStream(_ context.Context, _ string, ...
function buildReverseMapFromOriginalOpenAI (line 380) | func buildReverseMapFromOriginalOpenAI(original []byte) map[string]string {
FILE: internal/translator/codex/openai/chat-completions/codex_openai_response_test.go
function TestConvertCodexResponseToOpenAI_StreamSetsModelFromResponseCreated (line 10) | func TestConvertCodexResponseToOpenAI_StreamSetsModelFromResponseCreated...
function TestConvertCodexResponseToOpenAI_FirstChunkUsesRequestModelName (line 32) | func TestConvertCodexResponseToOpenAI_FirstChunkUsesRequestModelName(t *...
FILE: internal/translator/codex/openai/chat-completions/init.go
function init (line 9) | func init() {
FILE: internal/translator/codex/openai/responses/codex_openai-responses_request.go
function ConvertOpenAIResponsesRequestToCodex (line 10) | func ConvertOpenAIResponsesRequestToCodex(modelName string, inputRawJSON...
function applyResponsesCompactionCompatibility (line 54) | func applyResponsesCompactionCompatibility(rawJSON []byte) []byte {
function convertSystemRoleToDeveloper (line 66) | func convertSystemRoleToDeveloper(rawJSON []byte) []byte {
FILE: internal/translator/codex/openai/responses/codex_openai-responses_request_test.go
function TestConvertSystemRoleToDeveloper_BasicConversion (line 10) | func TestConvertSystemRoleToDeveloper_BasicConversion(t *testing.T) {
function TestConvertSystemRoleToDeveloper_MultipleSystemMessages (line 50) | func TestConvertSystemRoleToDeveloper_MultipleSystemMessages(t *testing....
function TestConvertSystemRoleToDeveloper_NoSystemMessages (line 94) | func TestConvertSystemRoleToDeveloper_NoSystemMessages(t *testing.T) {
function TestConvertSystemRoleToDeveloper_EmptyInput (line 127) | func TestConvertSystemRoleToDeveloper_EmptyInput(t *testing.T) {
function TestConvertSystemRoleToDeveloper_NoInputField (line 147) | func TestConvertSystemRoleToDeveloper_NoInputField(t *testing.T) {
function TestConvertOpenAIResponsesRequestToCodex_OriginalIssue (line 169) | func TestConvertOpenAIResponsesRequestToCodex_OriginalIssue(t *testing.T) {
function TestConvertSystemRoleToDeveloper_AssistantRole (line 223) | func TestConvertSystemRoleToDeveloper_AssistantRole(t *testing.T) {
function TestUserFieldDeletion (line 267) | func TestUserFieldDeletion(t *testing.T) {
function TestContextManagementCompactionCompatibility (line 284) | func TestContextManagementCompactionCompatibility(t *testing.T) {
function TestTruncationRemovedForCodexCompatibility (line 307) | func TestTruncationRemovedForCodexCompatibility(t *testing.T) {
FILE: internal/translator/codex/openai/responses/codex_openai-responses_response.go
function ConvertCodexResponseToOpenAIResponses (line 14) | func ConvertCodexResponseToOpenAIResponses(_ context.Context, _ string, ...
function ConvertCodexResponseToOpenAIResponsesNonStream (line 25) | func ConvertCodexResponseToOpenAIResponsesNonStream(_ context.Context, _...
FILE: internal/translator/codex/openai/responses/init.go
function init (line 9) | func init() {
FILE: internal/translator/gemini-cli/claude/gemini-cli_claude_request.go
constant geminiCLIClaudeThoughtSignature (line 17) | geminiCLIClaudeThoughtSignature = "skip_thought_signature_validator"
function ConvertClaudeRequestToCLI (line 37) | func ConvertClaudeRequestToCLI(modelName string, inputRawJSON []byte, _ ...
FILE: internal/translator/gemini-cli/claude/gemini-cli_claude_request_test.go
function TestConvertClaudeRequestToCLI_ToolChoice_SpecificTool (line 9) | func TestConvertClaudeRequestToCLI_ToolChoice_SpecificTool(t *testing.T) {
FILE: internal/translator/gemini-cli/claude/gemini-cli_claude_response.go
type Params (line 25) | type Params struct
function ConvertGeminiCLIResponseToClaude (line 51) | func ConvertGeminiCLIResponseToClaude(_ context.Context, _ string, origi...
function ConvertGeminiCLIResponseToClaudeNonStream (line 275) | func ConvertGeminiCLIResponseToClaudeNonStream(_ context.Context, _ stri...
function ClaudeTokenCount (line 377) | func ClaudeTokenCount(ctx context.Context, count int64) string {
FILE: internal/translator/gemini-cli/claude/init.go
function init (line 9) | func init() {
FILE: internal/translator/gemini-cli/gemini/gemini-cli_gemini_request.go
function ConvertGeminiRequestToGeminiCLI (line 35) | func ConvertGeminiRequestToGeminiCLI(_ string, inputRawJSON []byte, _ bo...
type FunctionCallGroup (line 135) | type FunctionCallGroup struct
function backfillFunctionResponseName (line 142) | func backfillFunctionResponseName(raw string, fallbackName string) string {
function fixCLIToolResponse (line 162) | func fixCLIToolResponse(input string) (string, error) {
FILE: internal/translator/gemini-cli/gemini/gemini-cli_gemini_response.go
function ConvertGeminiCliResponseToGemini (line 33) | func ConvertGeminiCliResponseToGemini(ctx context.Context, _ string, ori...
function ConvertGeminiCliResponseToGeminiNonStream (line 76) | func ConvertGeminiCliResponseToGeminiNonStream(_ context.Context, _ stri...
function GeminiTokenCount (line 84) | func GeminiTokenCount(ctx context.Context, count int64) string {
FILE: internal/translator/gemini-cli/gemini/init.go
function init (line 9) | func init() {
FILE: internal/translator/gemini-cli/openai/chat-completions/gemini-cli_openai_request.go
constant geminiCLIFunctionThoughtSignature (line 17) | geminiCLIFunctionThoughtSignature = "skip_thought_signature_validator"
function ConvertOpenAIRequestToGeminiCLI (line 29) | func ConvertOpenAIRequestToGeminiCLI(modelName string, inputRawJSON []by...
function itoa (line 400) | func itoa(i int) string { return fmt.Sprintf("%d", i) }
FILE: internal/translator/gemini-cli/openai/chat-completions/gemini-cli_openai_response.go
type convertCliResponseToOpenAIChatParams (line 23) | type convertCliResponseToOpenAIChatParams struct
function ConvertCliResponseToOpenAI (line 45) | func ConvertCliResponseToOpenAI(_ context.Context, _ string, originalReq...
function ConvertCliResponseToOpenAINonStream (line 229) | func ConvertCliResponseToOpenAINonStream(ctx context.Context, modelName ...
FILE: internal/translator/gemini-cli/openai/chat-completions/init.go
function init (line 9) | func init() {
FILE: internal/translator/gemini-cli/openai/responses/gemini-cli_openai-responses_request.go
function ConvertOpenAIResponsesRequestToGeminiCLI (line 8) | func ConvertOpenAIResponsesRequestToGeminiCLI(modelName string, inputRaw...
FILE: internal/translator/gemini-cli/openai/responses/gemini-cli_openai-responses_response.go
function ConvertGeminiCLIResponseToOpenAIResponses (line 10) | func ConvertGeminiCLIResponseToOpenAIResponses(ctx context.Context, mode...
function ConvertGeminiCLIResponseToOpenAIResponsesNonStream (line 18) | func ConvertGeminiCLIResponseToOpenAIResponsesNonStream(ctx context.Cont...
FILE: internal/translator/gemini-cli/openai/responses/init.go
function init (line 9) | func init() {
FILE: internal/translator/gemini/claude/gemini_claude_request.go
constant geminiClaudeThoughtSignature (line 18) | geminiClaudeThoughtSignature = "skip_thought_signature_validator"
function ConvertClaudeRequestToGemini (line 31) | func ConvertClaudeRequestToGemini(modelName string, inputRawJSON []byte,...
function toolNameFromClaudeToolUseID (line 253) | func toolNameFromClaudeToolUseID(toolUseID string) string {
FILE: internal/translator/gemini/claude/gemini_claude_request_test.go
function TestConvertClaudeRequestToGemini_ToolChoice_SpecificTool (line 9) | func TestConvertClaudeRequestToGemini_ToolChoice_SpecificTool(t *testing...
function TestConvertClaudeRequestToGemini_ImageContent (line 44) | func TestConvertClaudeRequestToGemini_ImageContent(t *testing.T) {
FILE: internal/translator/gemini/claude/gemini_claude_response.go
type Params (line 22) | type Params struct
function ConvertGeminiResponseToClaude (line 51) | func ConvertGeminiResponseToClaude(_ context.Context, _ string, original...
function ConvertGeminiResponseToClaudeNonStream (line 283) | func ConvertGeminiResponseToClaudeNonStream(_ context.Context, _ string,...
function ClaudeTokenCount (line 386) | func ClaudeTokenCount(ctx context.Context, count int64) string {
FILE: internal/translator/gemini/claude/init.go
function init (line 9) | func init() {
FILE: internal/translator/gemini/common/safety.go
function DefaultSafetySettings (line 9) | func DefaultSafetySettings() []map[string]string {
function AttachDefaultSafetySettings (line 36) | func AttachDefaultSafetySettings(rawJSON []byte, path string) []byte {
FILE: internal/translator/gemini/gemini-cli/gemini_gemini-cli_request.go
function ConvertGeminiCLIRequestToGemini (line 20) | func ConvertGeminiCLIRequestToGemini(_ string, inputRawJSON []byte, _ bo...
FILE: internal/translator/gemini/gemini-cli/gemini_gemini-cli_response.go
function ConvertGeminiResponseToGeminiCLI (line 30) | func ConvertGeminiResponseToGeminiCLI(_ context.Context, _ string, origi...
function ConvertGeminiResponseToGeminiCLINonStream (line 54) | func ConvertGeminiResponseToGeminiCLINonStream(_ context.Context, _ stri...
function GeminiCLITokenCount (line 60) | func GeminiCLITokenCount(ctx context.Context, count int64) string {
FILE: internal/translator/gemini/gemini-cli/init.go
function init (line 9) | func init() {
FILE: internal/translator/gemini/gemini/gemini_gemini_request.go
function ConvertGeminiRequestToGemini (line 22) | func ConvertGeminiRequestToGemini(_ string, inputRawJSON []byte, _ bool)...
function backfillEmptyFunctionResponseNames (line 112) | func backfillEmptyFunctionResponseNames(data []byte) []byte {
FILE: internal/translator/gemini/gemini/gemini_gemini_request_test.go
function TestBackfillEmptyFunctionResponseNames_Single (line 9) | func TestBackfillEmptyFunctionResponseNames_Single(t *testing.T) {
function TestBackfillEmptyFunctionResponseNames_Parallel (line 35) | func TestBackfillEmptyFunctionResponseNames_Parallel(t *testing.T) {
function TestBackfillEmptyFunctionResponseNames_PreservesExisting (line 67) | func TestBackfillEmptyFunctionResponseNames_PreservesExisting(t *testing...
function TestConvertGeminiRequestToGemini_BackfillsEmptyName (line 93) | func TestConvertGeminiRequestToGemini_BackfillsEmptyName(t *testing.T) {
function TestBackfillEmptyFunctionResponseNames_MoreResponsesThanCalls (line 119) | func TestBackfillEmptyFunctionResponseNames_MoreResponsesThanCalls(t *te...
function TestBackfillEmptyFunctionResponseNames_MultipleGroups (line 152) | func TestBackfillEmptyFunctionResponseNames_MultipleGroups(t *testing.T) {
FILE: internal/translator/gemini/gemini/gemini_gemini_response.go
function PassthroughGeminiResponseStream (line 10) | func PassthroughGeminiResponseStream(_ context.Context, _ string, origin...
function PassthroughGeminiResponseNonStream (line 23) | func PassthroughGeminiResponseNonStream(_ context.Context, _ string, ori...
function GeminiTokenCount (line 27) | func GeminiTokenCount(ctx context.Context, count int64) string {
FILE: internal/translator/gemini/gemini/init.go
function init (line 11) | func init() {
FILE: internal/translator/gemini/openai/chat-completions/gemini_openai_request.go
constant geminiFunctionThoughtSignature (line 17) | geminiFunctionThoughtSignature = "skip_thought_signature_validator"
function ConvertOpenAIRequestToGemini (line 29) | func ConvertOpenAIRequestToGemini(modelName string, inputRawJSON []byte,...
function itoa (line 408) | func itoa(i int) string { return fmt.Sprintf("%d", i) }
FILE: internal/translator/gemini/openai/chat-completions/gemini_openai_response.go
type convertGeminiResponseToOpenAIChatParams (line 22) | type convertGeminiResponseToOpenAIChatParams struct
function ConvertGeminiResponseToOpenAI (line 45) | func ConvertGeminiResponseToOpenAI(_ context.Context, _ string, original...
function ConvertGeminiResponseToOpenAINonStream (line 267) | func ConvertGeminiResponseToOpenAINonStream(_ context.Context, _ string,...
FILE: internal/translator/gemini/openai/chat-completions/init.go
function init (line 9) | func init() {
FILE: internal/translator/gemini/openai/responses/gemini_openai-responses_request.go
constant geminiResponsesThoughtSignature (line 12) | geminiResponsesThoughtSignature = "skip_thought_signature_validator"
function ConvertOpenAIResponsesRequestToGemini (line 14) | func ConvertOpenAIResponsesRequestToGemini(modelName string, inputRawJSO...
FILE: internal/translator/gemini/openai/responses/gemini_openai-responses_response.go
type geminiToResponsesState (line 15) | type geminiToResponsesState struct
function pickRequestJSON (line 51) | func pickRequestJSON(originalRequestRawJSON, requestRawJSON []byte) []by...
function unwrapRequestRoot (line 61) | func unwrapRequestRoot(root gjson.Result) gjson.Result {
function unwrapGeminiResponseRoot (line 72) | func unwrapGeminiResponseRoot(root gjson.Result) gjson.Result {
function emitEvent (line 84) | func emitEvent(event string, payload string) string {
function ConvertGeminiResponseToOpenAIResponses (line 89) | func ConvertGeminiResponseToOpenAIResponses(_ context.Context, modelName...
function ConvertGeminiResponseToOpenAIResponsesNonStream (line 564) | func ConvertGeminiResponseToOpenAIResponsesNonStream(_ context.Context, ...
FILE: internal/translator/gemini/openai/responses/gemini_openai-responses_response_test.go
function parseSSEEvent (line 11) | func parseSSEEvent(t *testing.T, chunk string) (string, gjson.Result) {
function TestConvertGeminiResponseToOpenAIResponses_UnwrapAndAggregateText (line 27) | func TestConvertGeminiResponseToOpenAIResponses_UnwrapAndAggregateText(t...
function TestConvertGeminiResponseToOpenAIResponses_ReasoningEncryptedContent (line 156) | func TestConvertGeminiResponseToOpenAIResponses_ReasoningEncryptedConten...
function TestConvertGeminiResponseToOpenAIResponses_FunctionCallEventOrder (line 197) | func TestConvertGeminiResponseToOpenAIResponses_FunctionCallEventOrder(t...
function TestConvertGeminiResponseToOpenAIResponses_ResponseOutputOrdering (line 302) | func TestConvertGeminiResponseToOpenAIResponses_ResponseOutputOrdering(t...
FILE: internal/translator/gemini/openai/responses/init.go
function init (line 9) | func init() {
FILE: internal/translator/openai/claude/init.go
function init (line 9) | func init() {
FILE: internal/translator/openai/claude/openai_claude_request.go
function ConvertClaudeRequestToOpenAI (line 19) | func ConvertClaudeRequestToOpenAI(modelName string, inputRawJSON []byte,...
function convertClaudeContentPart (line 331) | func convertClaudeContentPart(part gjson.Result) (string, bool) {
function convertClaudeToolResultContent (line 382) | func convertClaudeToolResultContent(content gjson.Result) (string, bool) {
FILE: internal/translator/openai/claude/openai_claude_request_test.go
function TestConvertClaudeRequestToOpenAI_ThinkingToReasoningContent (line 11) | func TestConvertClaudeRequestToOpenAI_ThinkingToReasoningContent(t *test...
function TestConvertClaudeRequestToOpenAI_ThinkingOnlyMessagePreserved (line 251) | func TestConvertClaudeRequestToOpenAI_ThinkingOnlyMessagePreserved(t *te...
function TestConvertClaudeRequestToOpenAI_SystemMessageScenarios (line 295) | func TestConvertClaudeRequestToOpenAI_SystemMessageScenarios(t *testing....
function TestConvertClaudeRequestToOpenAI_ToolResultOrderAndContent (line 393) | func TestConvertClaudeRequestToOpenAI_ToolResultOrderAndContent(t *testi...
function TestConvertClaudeRequestToOpenAI_ToolResultObjectContent (line 452) | func TestConvertClaudeRequestToOpenAI_ToolResultObjectContent(t *testing...
function TestConvertClaudeRequestToOpenAI_ToolResultTextAndImageContent (line 491) | func TestConvertClaudeRequestToOpenAI_ToolResultTextAndImageContent(t *t...
function TestConvertClaudeRequestToOpenAI_ToolResultURLImageOnly (line 550) | func TestConvertClaudeRequestToOpenAI_ToolResultURLImageOnly(t *testing....
function TestConvertClaudeRequestToOpenAI_AssistantTextToolUseTextOrder (line 599) | func TestConvertClaudeRequestToOpenAI_AssistantTextToolUseTextOrder(t *t...
function TestConvertClaudeRequestToOpenAI_AssistantThinkingToolUseThinkingSplit (line 649) | func TestConvertClaudeRequestToOpenAI_AssistantThinkingToolUseThinkingSp...
FILE: internal/translator/openai/claude/openai_claude_response.go
type ConvertOpenAIResponseToAnthropicParams (line 24) | type ConvertOpenAIResponseToAnthropicParams struct
method toolContentBlockIndex (line 474) | func (p *ConvertOpenAIResponseToAnthropicParams) toolContentBlockIndex...
type ToolCallAccumulator (line 59) | type ToolCallAccumulator struct
function ConvertOpenAIResponseToClaude (line 77) | func ConvertOpenAIResponseToClaude(_ context.Context, _ string, original...
function effectiveOpenAIFinishReason (line 122) | func effectiveOpenAIFinishReason(param *ConvertOpenAIResponseToAnthropic...
function convertOpenAIStreamingChunkToAnthropic (line 133) | func convertOpenAIStreamingChunkToAnthropic(rawJSON []byte, param *Conve...
function convertOpenAIDoneToAnthropic (line 337) | func convertOpenAIDoneToAnthropic(param *ConvertOpenAIResponseToAnthropi...
function convertOpenAINonStreamingToAnthropic (line 385) | func convertOpenAINonStreamingToAnthropic(rawJSON []byte) []string {
function mapOpenAIFinishReasonToAnthropic (line 457) | func mapOpenAIFinishReasonToAnthropic(openAIReason string) string {
function collectOpenAIReasoningTexts (line 484) | func collectOpenAIReasoningTexts(node gjson.Result) []string {
function stopThinkingContentBlock (line 516) | func stopThinkingContentBlock(param *ConvertOpenAIResponseToAnthropicPar...
function emitMessageStopIfNeeded (line 527) | func emitMessageStopIfNeeded(param *ConvertOpenAIResponseToAnthropicPara...
function stopTextContentBlock (line 535) | func stopTextContentBlock(param *ConvertOpenAIResponseToAnthropicParams,...
function ConvertOpenAIResponseToClaudeNonStream (line 556) | func ConvertOpenAIResponseToClaudeNonStream(_ context.Context, _ string,...
function ClaudeTokenCount (line 714) | func ClaudeTokenCount(ctx context.Context, count int64) string {
function extractOpenAIUsage (line 718) | func extractOpenAIUsage(usage gjson.Result) (int64, int64, int64) {
FILE: internal/translator/openai/gemini-cli/init.go
function init (line 9) | func init() {
FILE: internal/translator/openai/gemini-cli/openai_gemini_request.go
function ConvertGeminiCLIRequestToOpenAI (line 17) | func ConvertGeminiCLIRequestToOpenAI(modelName string, inputRawJSON []by...
FILE: internal/translator/openai/gemini-cli/openai_gemini_response.go
function ConvertOpenAIResponseToGeminiCLI (line 28) | func ConvertOpenAIResponseToGeminiCLI(ctx context.Context, modelName str...
function ConvertOpenAIResponseToGeminiCLINonStream (line 49) | func ConvertOpenAIResponseToGeminiCLINonStream(ctx context.Context, mode...
function GeminiCLITokenCount (line 56) | func GeminiCLITokenCount(ctx context.Context, count int64) string {
FILE: internal/translator/openai/gemini/init.go
function init (line 9) | func init() {
FILE: internal/translator/openai/gemini/openai_gemini_request.go
function ConvertGeminiRequestToOpenAI (line 22) | func ConvertGeminiRequestToOpenAI(modelName string, inputRawJSON []byte,...
FILE: internal/translator/openai/gemini/openai_gemini_response.go
type ConvertOpenAIResponseToGeminiParams (line 20) | type ConvertOpenAIResponseToGeminiParams struct
type ToolCallAccumulator (line 30) | type ToolCallAccumulator struct
function ConvertOpenAIResponseToGemini (line 48) | func ConvertOpenAIResponseToGemini(_ context.Context, _ string, original...
function mapOpenAIFinishReasonToGemini (line 251) | func mapOpenAIFinishReasonToGemini(openAIReason string) string {
function parseArgsToObjectRaw (line 268) | func parseArgsToObjectRaw(argsStr string) string {
function escapeSjsonPathKey (line 292) | func escapeSjsonPathKey(key string) string {
function tolerantParseJSONObjectRaw (line 301) | func tolerantParseJSONObjectRaw(s string) string {
function parseJSONStringRunes (line 419) | func parseJSONStringRunes(runes []rune, start int) (string, int) {
function jsonStringTokenToRawString (line 442) | func jsonStringTokenToRawString(token string) string {
function captureBracketed (line 456) | func captureBracketed(runes []rune, i int) (string, int) {
function tryParseNumber (line 508) | func tryParseNumber(s string) (interface{}, bool) {
function ConvertOpenAIResponseToGeminiNonStream (line 535) | func ConvertOpenAIResponseToGeminiNonStream(_ context.Context, _ string,...
function GeminiTokenCount (line 623) | func GeminiTokenCount(ctx context.Context, count int64) string {
function reasoningTokensFromUsage (line 627) | func reasoningTokensFromUsage(usage gjson.Result) int64 {
function extractReasoningTexts (line 639) | func extractReasoningTexts(node gjson.Result) []string {
FILE: internal/translator/openai/openai/chat-completions/init.go
function init (line 9) | func init() {
FILE: internal/translator/openai/openai/chat-completions/openai_openai_request.go
function ConvertOpenAIRequestToOpenAI (line 19) | func ConvertOpenAIRequestToOpenAI(modelName string, inputRawJSON []byte,...
FILE: internal/translator/openai/openai/chat-completions/openai_openai_response.go
function ConvertOpenAIResponseToOpenAI (line 27) | func ConvertOpenAIResponseToOpenAI(_ context.Context, _ string, original...
function ConvertOpenAIResponseToOpenAINonStream (line 50) | func ConvertOpenAIResponseToOpenAINonStream(ctx context.Context, modelNa...
FILE: internal/translator/openai/openai/responses/init.go
function init (line 9) | func init() {
FILE: internal/translator/openai/openai/responses/openai_openai-responses_request.go
function ConvertOpenAIResponsesRequestToOpenAIChatCompletions (line 29) | func ConvertOpenAIResponsesRequestToOpenAIChatCompletions(modelName stri...
FILE: internal/translator/openai/openai/responses/openai_openai-responses_response.go
type oaiToResponsesStateReasoning (line 15) | type oaiToResponsesStateReasoning struct
type oaiToResponsesState (line 19) | type oaiToResponsesState struct
function emitRespEvent (line 53) | func emitRespEvent(event string, payload string) string {
function ConvertOpenAIChatCompletionsResponseToOpenAIResponses (line 59) | func ConvertOpenAIChatCompletionsResponseToOpenAIResponses(ctx context.C...
function ConvertOpenAIChatCompletionsResponseToOpenAIResponsesNonStream (line 606) | func ConvertOpenAIChatCompletionsResponseToOpenAIResponsesNonStream(_ co...
FILE: internal/translator/translator/translator.go
function Register (line 24) | func Register(from, to string, request interfaces.TranslateRequestFunc, ...
function Request (line 39) | func Request(from, to, modelName string, rawJSON []byte, stream bool) []...
function NeedConvert (line 51) | func NeedConvert(from, to string) bool {
function Response (line 69) | func Response(from, to string, ctx context.Context, modelName string, or...
function ResponseNonStream (line 87) | func ResponseNonStream(from, to string, ctx context.Context, modelName s...
FILE: internal/tui/app.go
constant tabDashboard (line 16) | tabDashboard = iota
constant tabConfig (line 17) | tabConfig
constant tabAuthFiles (line 18) | tabAuthFiles
constant tabAPIKeys (line 19) | tabAPIKeys
constant tabOAuth (line 20) | tabOAuth
constant tabUsage (line 21) | tabUsage
constant tabLogs (line 22) | tabLogs
type App (line 26) | type App struct
method Init (line 101) | func (a App) Init() tea.Cmd {
method Update (line 112) | func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
method refreshTabs (line 285) | func (a *App) refreshTabs() {
method initTabIfNeeded (line 309) | func (a *App) initTabIfNeeded(_ int) tea.Cmd {
method View (line 336) | func (a App) View() string {
method renderAuthView (line 378) | func (a App) renderAuthView() string {
method renderTabBar (line 399) | func (a App) renderTabBar() string {
method renderStatusBar (line 412) | func (a App) renderStatusBar() string {
method setAuthInputPrompt (line 481) | func (a *App) setAuthInputPrompt() {
method connectWithPassword (line 488) | func (a App) connectWithPassword(password string) tea.Cmd {
method broadcastToAllTabs (line 508) | func (a App) broadcastToAllTabs(msg tea.Msg) (tea.Model, tea.Cmd) {
type authConnectMsg (line 56) | type authConnectMsg struct
function NewApp (line 62) | func NewApp(port int, secretKey string, hook *LogHook) App {
type localeChangedMsg (line 283) | type localeChangedMsg struct
function fitStringWidth (line 447) | func fitStringWidth(text string, maxWidth int) string {
function isLogsEnabledFromConfig (line 466) | func isLogsEnabledFromConfig(cfg map[string]any) bool {
function Run (line 498) | func Run(port int, secretKey string, hook *LogHook, output io.Writer) er...
FILE: internal/tui/auth_tab.go
type editableField (line 15) | type editableField struct
type authTabModel (line 27) | type authTabModel struct
method Init (line 68) | func (m authTabModel) Init() tea.Cmd {
method fetchFiles (line 72) | func (m authTabModel) fetchFiles() tea.Msg {
method Update (line 77) | func (m authTabModel) Update(msg tea.Msg) (authTabModel, tea.Cmd) {
method startEdit (line 127) | func (m *authTabModel) startEdit(fieldIdx int) tea.Cmd {
method SetSize (line 146) | func (m *authTabModel) SetSize(w, h int) {
method View (line 160) | func (m authTabModel) View() string {
method renderContent (line 167) | func (m authTabModel) renderContent() string {
method renderDetail (line 254) | func (m authTabModel) renderDetail(f map[string]any) string {
method handleEditInput (line 330) | func (m authTabModel) handleEditInput(msg tea.KeyMsg) (authTabModel, t...
method handleConfirmInput (line 370) | func (m authTabModel) handleConfirmInput(msg tea.KeyMsg) (authTabModel...
method handleNormalInput (line 395) | func (m authTabModel) handleNormalInput(msg tea.KeyMsg) (authTabModel,...
type authFilesMsg (line 47) | type authFilesMsg struct
type authActionMsg (line 52) | type authActionMsg struct
function newAuthTabModel (line 57) | func newAuthTabModel(client *Client) authTabModel {
function getAnyString (line 315) | func getAnyString(m map[string]any, key string) string {
function max (line 323) | func max(a, b int) int {
FILE: internal/tui/browser.go
function openBrowser (line 9) | func openBrowser(url string) error {
FILE: internal/tui/client.go
type Client (line 15) | type Client struct
method SetSecretKey (line 33) | func (c *Client) SetSecretKey(secretKey string) {
method doRequest (line 37) | func (c *Client) doRequest(method, path string, body io.Reader) ([]byt...
method get (line 61) | func (c *Client) get(path string) ([]byte, error) {
method put (line 72) | func (c *Client) put(path string, body io.Reader) ([]byte, error) {
method patch (line 83) | func (c *Client) patch(path string, body io.Reader) ([]byte, error) {
method getJSON (line 95) | func (c *Client) getJSON(path string) (map[string]any, error) {
method postJSON (line 108) | func (c *Client) postJSON(path string, body any) error {
method GetConfig (line 124) | func (c *Client) GetConfig() (map[string]any, error) {
method GetConfigYAML (line 129) | func (c *Client) GetConfigYAML() (string, error) {
method PutConfigYAML (line 138) | func (c *Client) PutConfigYAML(yamlContent string) error {
method GetUsage (line 144) | func (c *Client) GetUsage() (map[string]any, error) {
method GetAuthFiles (line 150) | func (c *Client) GetAuthFiles() ([]map[string]any, error) {
method DeleteAuthFile (line 159) | func (c *Client) DeleteAuthFile(name string) error {
method ToggleAuthFile (line 174) | func (c *Client) ToggleAuthFile(name string, disabled bool) error {
method PatchAuthFileFields (line 181) | func (c *Client) PatchAuthFileFields(name string, fields map[string]an...
method GetLogs (line 189) | func (c *Client) GetLogs(after int64, limit int) ([]string, int64, err...
method GetAPIKeys (line 244) | func (c *Client) GetAPIKeys() ([]string, error) {
method AddAPIKey (line 265) | func (c *Client) AddAPIKey(key string) error {
method EditAPIKey (line 273) | func (c *Client) EditAPIKey(index int, newValue string) error {
method DeleteAPIKey (line 281) | func (c *Client) DeleteAPIKey(index int) error {
method GetGeminiKeys (line 294) | func (c *Client) GetGeminiKeys() ([]map[string]any, error) {
method GetClaudeKeys (line 299) | func (c *Client) GetClaudeKeys() ([]map[string]any, error) {
method GetCodexKeys (line 304) | func (c *Client) GetCodexKeys() ([]map[string]any, error) {
method GetVertexKeys (line 309) | func (c *Client) GetVertexKeys() ([]map[string]any, error) {
method GetOpenAICompat (line 314) | func (c *Client) GetOpenAICompat() ([]map[string]any, error) {
method getWrappedKeyList (line 319) | func (c *Client) getWrappedKeyList(path, key string) ([]map[string]any...
method GetDebug (line 345) | func (c *Client) GetDebug() (bool, error) {
method GetAuthStatus (line 360) | func (c *Client) GetAuthStatus(state string) (string, string, error) {
method PutBoolField (line 376) | func (c *Client) PutBoolField(path string, value bool) error {
method PutIntField (line 383) | func (c *Client) PutIntField(path string, value int) error {
method PutStringField (line 390) | func (c *Client) PutStringField(path string, value string) error {
method DeleteField (line 397) | func (c *Client) DeleteField(path string) error {
function NewClient (line 22) | func NewClient(port int, secretKey string) *Client {
function extractList (line 328) | func extractList(wrapper map[string]any, key string) ([]map[string]any, ...
FILE: internal/tui/config_tab.go
type configField (line 15) | type configField struct
type configTabModel (line 24) | type configTabModel struct
method Init (line 58) | func (m configTabModel) Init() tea.Cmd {
method fetchConfig (line 62) | func (m configTabModel) fetchConfig() tea.Msg {
method Update (line 67) | func (m configTabModel) Update(msg tea.Msg) (configTabModel, tea.Cmd) {
method handleNormalKey (line 105) | func (m configTabModel) handleNormalKey(msg tea.KeyMsg) (configTabMode...
method handleEditingKey (line 150) | func (m configTabModel) handleEditingKey(msg tea.KeyMsg) (configTabMod...
method toggleBool (line 169) | func (m configTabModel) toggleBool(idx int) tea.Cmd {
method submitEdit (line 183) | func (m configTabModel) submitEdit(idx int, newValue string) tea.Cmd {
method SetSize (line 218) | func (m *configTabModel) SetSize(w, h int) {
method ensureCursorVisible (line 231) | func (m *configTabModel) ensureCursorVisible() {
method View (line 242) | func (m configTabModel) View() string {
method renderContent (line 249) | func (m configTabModel) renderContent() string {
method parseConfig (line 326) | func (m configTabModel) parseConfig(cfg map[string]any) []configField {
type configDataMsg (line 38) | type configDataMsg struct
type configUpdateMsg (line 43) | type configUpdateMsg struct
function newConfigTabModel (line 49) | func newConfigTabModel(client *Client) configTabModel {
function configFieldEditValue (line 211) | func configFieldEditValue(f configField) string {
function fieldSection (line 371) | func fieldSection(apiPath string) string {
function getBoolNested (line 393) | func getBoolNested(m map[string]any, keys ...string) bool {
function maskIfNotEmpty (line 408) | func maskIfNotEmpty(s string) string {
FILE: internal/tui/dashboard.go
type dashboardModel (line 14) | type dashboardModel struct
method Init (line 44) | func (m dashboardModel) Init() tea.Cmd {
method fetchData (line 48) | func (m dashboardModel) fetchData() tea.Msg {
method Update (line 64) | func (m dashboardModel) Update(msg tea.Msg) (dashboardModel, tea.Cmd) {
method SetSize (line 104) | func (m *dashboardModel) SetSize(w, h int) {
method View (line 117) | func (m dashboardModel) View() string {
method renderDashboard (line 124) | func (m dashboardModel) renderDashboard(cfg, usage map[string]any, aut...
type dashboardDataMsg (line 30) | type dashboardDataMsg struct
function newDashboardModel (line 38) | func newDashboardModel(client *Client) dashboardModel {
function formatKV (line 296) | func formatKV(key, value string) string {
function getString (line 300) | func getString(m map[string]any, key string) string {
function getFloat (line 309) | func getFloat(m map[string]any, key string) float64 {
function getBool (line 322) | func getBool(m map[string]any, key string) bool {
function boolEmoji (line 331) | func boolEmoji(b bool) string {
function formatLargeNumber (line 338) | func formatLargeNumber(n int64) string {
function truncate (line 348) | func truncate(s string, maxLen int) string {
function minInt (line 355) | func minInt(a, b int) int {
FILE: internal/tui/i18n.go
function SetLocale (line 9) | func SetLocale(locale string) {
function CurrentLocale (line 16) | func CurrentLocale() string {
function ToggleLocale (line 21) | func ToggleLocale() {
function T (line 30) | func T(key string) string {
function TabNames (line 57) | func TabNames() []string {
FILE: internal/tui/keys_tab.go
type keysTabModel (line 15) | type keysTabModel struct
method Init (line 65) | func (m keysTabModel) Init() tea.Cmd {
method fetchKeys (line 69) | func (m keysTabModel) fetchKeys() tea.Msg {
method Update (line 85) | func (m keysTabModel) Update(msg tea.Msg) (keysTabModel, tea.Cmd) {
method SetSize (line 257) | func (m *keysTabModel) SetSize(w, h int) {
method View (line 271) | func (m keysTabModel) View() string {
method renderContent (line 278) | func (m keysTabModel) renderContent() string {
type keysDataMsg (line 39) | type keysDataMsg struct
type keyActionMsg (line 49) | type keyActionMsg struct
function newKeysTabModel (line 54) | func newKeysTabModel(client *Client) keysTabModel {
function renderSection (line 373) | func renderSection(sb *strings.Builder, title string, count int) {
function renderProviderKeys (line 379) | func renderProviderKeys(sb *strings.Builder, title string, keys []map[st...
function maskKey (line 400) | func maskKey(key string) string {
FILE: internal/tui/loghook.go
type LogHook (line 12) | type LogHook struct
method SetFormatter (line 29) | func (h *LogHook) SetFormatter(f log.Formatter) {
method Levels (line 36) | func (h *LogHook) Levels() []log.Level {
method Fire (line 41) | func (h *LogHook) Fire(entry *log.Entry) error {
method Chan (line 76) | func (h *LogHook) Chan() <-chan string {
function NewLogHook (line 20) | func NewLogHook(bufSize int) *LogHook {
FILE: internal/tui/logs_tab.go
type logsTabModel (line 13) | type logsTabModel struct
method Init (line 46) | func (m logsTabModel) Init() tea.Cmd {
method fetchLogs (line 53) | func (m logsTabModel) fetchLogs() tea.Msg {
method waitForNextPoll (line 62) | func (m logsTabModel) waitForNextPoll() tea.Cmd {
method waitForLog (line 68) | func (m logsTabModel) waitForLog() tea.Msg {
method Update (line 79) | func (m logsTabModel) Update(msg tea.Msg) (logsTabModel, tea.Cmd) {
method SetSize (line 171) | func (m *logsTabModel) SetSize(w, h int) {
method View (line 184) | func (m logsTabModel) View() string {
method renderLogs (line 191) | func (m logsTabModel) renderLogs() string {
method matchLevel (line 234) | func (m logsTabModel) matchLevel(line string) bool {
method styleLine (line 247) | func (m logsTabModel) styleLine(line string) string {
type logsPollMsg (line 28) | type logsPollMsg struct
type logsTickMsg (line 34) | type logsTickMsg struct
type logLineMsg (line 35) | type logLineMsg
function newLogsTabModel (line 37) | func newLogsTabModel(client *Client, hook *LogHook) logsTabModel {
FILE: internal/tui/oauth_tab.go
type oauthProvider (line 15) | type oauthProvider struct
type oauthTabModel (line 32) | type oauthTabModel struct
method Init (line 90) | func (m oauthTabModel) Init() tea.Cmd {
method Update (line 94) | func (m oauthTabModel) Update(msg tea.Msg) (oauthTabModel, tea.Cmd) {
method startOAuth (line 246) | func (m oauthTabModel) startOAuth(provider oauthProvider) tea.Cmd {
method submitCallback (line 267) | func (m oauthTabModel) submitCallback(callbackURL string) tea.Cmd {
method pollOAuthStatus (line 307) | func (m oauthTabModel) pollOAuthStatus(state string) tea.Cmd {
method SetSize (line 346) | func (m *oauthTabModel) SetSize(w, h int) {
method View (line 360) | func (m oauthTabModel) View() string {
method renderContent (line 367) | func (m oauthTabModel) renderContent() string {
method renderRemoteMode (line 415) | func (m oauthTabModel) renderRemoteMode() string {
type oauthState (line 51) | type oauthState
constant oauthIdle (line 54) | oauthIdle oauthState = iota
constant oauthPending (line 55) | oauthPending
constant oauthRemote (line 56) | oauthRemote
constant oauthSuccess (line 57) | oauthSuccess
constant oauthError (line 58) | oauthError
type oauthStartMsg (line 62) | type oauthStartMsg struct
type oauthPollMsg (line 69) | type oauthPollMsg struct
type oauthCallbackSubmitMsg (line 75) | type oauthCallbackSubmitMsg struct
function newOAuthTabModel (line 79) | func newOAuthTabModel(client *Client) oauthTabModel {
function wrapText (line 460) | func wrapText(s string, maxWidth int) []string {
FILE: internal/tui/styles.go
function logLevelStyle (line 113) | func logLevelStyle(level string) lipgloss.Style {
FILE: internal/tui/usage_tab.go
type usageTabModel (line 14) | type usageTabModel struct
method Init (line 35) | func (m usageTabModel) Init() tea.Cmd {
method fetchData (line 39) | func (m usageTabModel) fetchData() tea.Msg {
method Update (line 44) | func (m usageTabModel) Update(msg tea.Msg) (usageTabModel, tea.Cmd) {
method SetSize (line 73) | func (m *usageTabModel) SetSize(w, h int) {
method View (line 86) | func (m usageTabModel) View() string {
method renderContent (line 93) | func (m usageTabModel) renderContent() string {
method renderTokenBreakdown (line 263) | func (m usageTabModel) renderTokenBreakdown(modelStats map[string]any)...
type usageDataMsg (line 24) | type usageDataMsg struct
function newUsageTabModel (line 29) | func newUsageTabModel(client *Client) usageTabModel {
function renderBarChart (line 312) | func renderBarChart(data map[string]any, maxBarWidth int, barColor lipgl...
FILE: internal/usage/logger_plugin.go
function init (line 20) | func init() {
type LoggerPlugin (line 27) | type LoggerPlugin struct
method HandleUsage (line 43) | func (p *LoggerPlugin) HandleUsage(ctx context.Context, record coreusa...
function NewLoggerPlugin (line 35) | func NewLoggerPlugin() *LoggerPlugin { return &LoggerPlugin{stats: defau...
function SetStatisticsEnabled (line 54) | func SetStatisticsEnabled(enabled bool) { statisticsEnabled.Store(enable...
function StatisticsEnabled (line 57) | func StatisticsEnabled() bool { return statisticsEnabled.Load() }
type RequestStatistics (line 60) | type RequestStatistics struct
method Record (line 154) | func (s *RequestStatistics) Record(ctx context.Context, record coreusa...
method updateAPIStats (line 213) | func (s *RequestStatistics) updateAPIStats(stats *apiStats, model stri...
method Snapshot (line 227) | func (s *RequestStatistics) Snapshot() StatisticsSnapshot {
method MergeSnapshot (line 292) | func (s *RequestStatistics) MergeSnapshot(snapshot StatisticsSnapshot)...
method recordImported (line 353) | func (s *RequestStatistics) recordImported(apiName, modelName string, ...
type apiStats (line 77) | type apiStats struct
type modelStats (line 84) | type modelStats struct
type RequestDetail (line 91) | type RequestDetail struct
type TokenStats (line 100) | type TokenStats struct
type StatisticsSnapshot (line 109) | type StatisticsSnapshot struct
type APISnapshot (line 124) | type APISnapshot struct
type ModelSnapshot (line 131) | type ModelSnapshot struct
function GetRequestStatistics (line 140) | func GetRequestStatistics() *RequestStatistics { return defaultRequestSt...
function NewRequestStatistics (line 143) | func NewRequestStatistics() *RequestStatistics {
type MergeResult (line 285) | type MergeResult struct
function dedupKey (line 378) | func dedupKey(apiName, modelName string, detail RequestDetail) string {
function resolveAPIIdentifier (line 397) | func resolveAPIIdentifier(ctx context.Context, record coreusage.Record) ...
function resolveSuccess (line 422) | func resolveSuccess(ctx context.Context) bool {
constant httpStatusBadRequest (line 437) | httpStatusBadRequest = 400
function normaliseDetail (line 439) | func normaliseDetail(detail coreusage.Detail) TokenStats {
function normaliseTokenStats (line 456) | func normaliseTokenStats(tokens TokenStats) TokenStats {
function formatHour (line 466) | func formatHour(hour int) string {
FILE: internal/util/claude_model.go
function IsClaudeThinkingModel (line 7) | func IsClaudeThinkingModel(model string) bool {
FILE: internal/util/claude_model_test.go
function TestIsClaudeThinkingModel (line 5) | func TestIsClaudeThinkingModel(t *testing.T) {
FILE: internal/util/claude_tool_id.go
function SanitizeClaudeToolID (line 18) | func SanitizeClaudeToolID(id string) string {
FILE: internal/util/gemini_schema.go
constant placeholderReasonDescription (line 16) | placeholderReasonDescription = "Brief explanation of why you are calling...
function CleanJSONSchemaForAntigravity (line 21) | func CleanJSONSchemaForAntigravity(jsonStr string) string {
function CleanJSONSchemaForGemini (line 27) | func CleanJSONSchemaForGemini(jsonStr string) string {
function cleanJSONSchema (line 32) | func cleanJSONSchema(jsonStr string, addPlaceholder bool) string {
function removeKeywords (line 63) | func removeKeywords(jsonStr string, keywords []string) string {
function removePlaceholderFields (line 82) | func removePlaceholderFields(jsonStr string) string {
function convertRefsToHints (line 147) | func convertRefsToHints(jsonStr string) string {
function convertConstToEnum (line 171) | func convertConstToEnum(jsonStr string) string {
function convertEnumValuesToStrings (line 187) | func convertEnumValuesToStrings(jsonStr string) string {
function addEnumHints (line 208) | func addEnumHints(jsonStr string) string {
function addAdditionalPropertiesHints (line 228) | func addAdditionalPropertiesHints(jsonStr string) string {
function moveConstraintsToDescription (line 243) | func moveConstraintsToDescription(jsonStr string) string {
function mergeAllOf (line 261) | func mergeAllOf(jsonStr string) string {
function flattenAnyOfOneOf (line 296) | func flattenAnyOfOneOf(jsonStr string) string {
function selectBest (line 329) | func selectBest(items []gjson.Result) (bestIdx int, types []string) {
function flattenTypeArrays (line 356) | func flattenTypeArrays(jsonStr string) string {
function removeUnsupportedKeywords (line 429) | func removeUnsupportedKeywords(jsonStr string) string {
function removeExtensionFields (line 457) | func removeExtensionFields(jsonStr string) string {
function walkForExtensions (line 471) | func walkForExtensions(value gjson.Result, path string, paths *[]string) {
function cleanupRequiredFields (line 498) | func cleanupRequiredFields(jsonStr string) string {
function addEmptySchemaPlaceholder (line 530) | func addEmptySchemaPlaceholder(jsonStr string) string {
function findPaths (line 593) | func findPaths(jsonStr, field string) []string {
function findPathsByFields (line 599) | func findPathsByFields(jsonStr string, fields []string) map[string][]str...
function walkForFields (line 609) | func walkForFields(value gjson.Result, path string, fields map[string]st...
function sortByDepth (line 635) | func sortByDepth(paths []string) {
function trimSuffix (line 639) | func trimSuffix(path, suffix string) string {
function joinPath (line 646) | func joinPath(base, suffix string) string {
function setRawAt (line 653) | func setRawAt(jsonStr, path, value string) string {
function isPropertyDefinition (line 661) | func isPropertyDefinition(path string) bool {
function descriptionPath (line 665) | func descriptionPath(parentPath string) string {
function appendHint (line 672) | func appendHint(jsonStr, parentPath, hint string) string {
function appendHintRaw (line 685) | func appendHintRaw(jsonRaw, hint string) string {
function getStrings (line 694) | func getStrings(jsonStr, path string) []string {
function contains (line 704) | func contains(slice []string, item string) bool {
function orDefault (line 713) | func orDefault(val, def string) string {
function escapeGJSONPathKey (line 720) | func escapeGJSONPathKey(key string) string {
function unescapeGJSONPathKey (line 727) | func unescapeGJSONPathKey(key string) string {
function splitGJSONPath (line 744) | func splitGJSONPath(path string) []string {
function mergeDescriptionRaw (line 772) | func mergeDescriptionRaw(schemaRaw, parentDesc string) string {
FILE: internal/util/gemini_schema_test.go
function TestCleanJSONSchemaForAntigravity_ConstToEnum (line 12) | func TestCleanJSONSchemaForAntigravity_ConstToEnum(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_TypeFlattening_Nullable (line 37) | func TestCleanJSONSchemaForAntigravity_TypeFlattening_Nullable(t *testin...
function TestCleanJSONSchemaForAntigravity_ConstraintsToDescription (line 69) | func TestCleanJSONSchemaForAntigravity_ConstraintsToDescription(t *testi...
function TestCleanJSONSchemaForAntigravity_AnyOfFlattening_SmartSelection (line 105) | func TestCleanJSONSchemaForAntigravity_AnyOfFlattening_SmartSelection(t ...
function TestCleanJSONSchemaForAntigravity_OneOfFlattening (line 142) | func TestCleanJSONSchemaForAntigravity_OneOfFlattening(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_AllOfMerging (line 169) | func TestCleanJSONSchemaForAntigravity_AllOfMerging(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_RefHandling (line 201) | func TestCleanJSONSchemaForAntigravity_RefHandling(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_RefHandling_DescriptionEscaping (line 239) | func TestCleanJSONSchemaForAntigravity_RefHandling_DescriptionEscaping(t...
function TestCleanJSONSchemaForAntigravity_CyclicRefDefaults (line 280) | func TestCleanJSONSchemaForAntigravity_CyclicRefDefaults(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_RequiredCleanup (line 308) | func TestCleanJSONSchemaForAntigravity_RequiredCleanup(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_AllOfMerging_DotKeys (line 331) | func TestCleanJSONSchemaForAntigravity_AllOfMerging_DotKeys(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_PropertyNameCollision (line 363) | func TestCleanJSONSchemaForAntigravity_PropertyNameCollision(t *testing....
function TestCleanJSONSchemaForAntigravity_DotKeys (line 398) | func TestCleanJSONSchemaForAntigravity_DotKeys(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_AnyOfAlternativeHints (line 437) | func TestCleanJSONSchemaForAntigravity_AnyOfAlternativeHints(t *testing....
function TestCleanJSONSchemaForAntigravity_NullableHint (line 461) | func TestCleanJSONSchemaForAntigravity_NullableHint(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_TypeFlattening_Nullable_DotKey (line 483) | func TestCleanJSONSchemaForAntigravity_TypeFlattening_Nullable_DotKey(t ...
function TestCleanJSONSchemaForAntigravity_EnumHint (line 515) | func TestCleanJSONSchemaForAntigravity_EnumHint(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_AdditionalPropertiesHint (line 537) | func TestCleanJSONSchemaForAntigravity_AdditionalPropertiesHint(t *testi...
function TestCleanJSONSchemaForAntigravity_AnyOfFlattening_PreservesDescription (line 553) | func TestCleanJSONSchemaForAntigravity_AnyOfFlattening_PreservesDescript...
function TestCleanJSONSchemaForAntigravity_SingleEnumNoHint (line 581) | func TestCleanJSONSchemaForAntigravity_SingleEnumNoHint(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_MultipleNonNullTypes (line 599) | func TestCleanJSONSchemaForAntigravity_MultipleNonNullTypes(t *testing.T) {
function compareJSON (line 619) | func compareJSON(t *testing.T, expectedJSON, actualJSON string) {
function TestCleanJSONSchemaForAntigravity_EmptySchemaPlaceholder (line 639) | func TestCleanJSONSchemaForAntigravity_EmptySchemaPlaceholder(t *testing...
function TestCleanJSONSchemaForAntigravity_EmptyPropertiesPlaceholder (line 656) | func TestCleanJSONSchemaForAntigravity_EmptyPropertiesPlaceholder(t *tes...
function TestCleanJSONSchemaForAntigravity_NonEmptySchemaUnchanged (line 671) | func TestCleanJSONSchemaForAntigravity_NonEmptySchemaUnchanged(t *testin...
function TestCleanJSONSchemaForAntigravity_NestedEmptySchema (line 693) | func TestCleanJSONSchemaForAntigravity_NestedEmptySchema(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_EmptySchemaWithDescription (line 718) | func TestCleanJSONSchemaForAntigravity_EmptySchemaWithDescription(t *tes...
function TestCleanJSONSchemaForAntigravity_FormatFieldRemoval (line 740) | func TestCleanJSONSchemaForAntigravity_FormatFieldRemoval(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_FormatFieldNoDescription (line 769) | func TestCleanJSONSchemaForAntigravity_FormatFieldNoDescription(t *testi...
function TestCleanJSONSchemaForAntigravity_MultipleFormats (line 793) | func TestCleanJSONSchemaForAntigravity_MultipleFormats(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_NumericEnumToString (line 822) | func TestCleanJSONSchemaForAntigravity_NumericEnumToString(t *testing.T) {
function TestCleanJSONSchemaForAntigravity_BooleanEnumToString (line 852) | func TestCleanJSONSchemaForAntigravity_BooleanEnumToString(t *testing.T) {
function TestCleanJSONSchemaForGemini_RemovesGeminiUnsupportedMetadataFields (line 873) | func TestCleanJSONSchemaForGemini_RemovesGeminiUnsupportedMetadataFields...
function TestRemoveExtensionFields (line 924) | func TestRemoveExtensionFields(t *testing.T) {
FILE: internal/util/header_helpers.go
function ApplyCustomHeadersFromAttrs (line 10) | func ApplyCustomHeadersFromAttrs(r *http.Request, attrs map[string]strin...
function extractCustomHeaders (line 17) | func extractCustomHeaders(attrs map[string]string) map[string]string {
function applyCustomHeaders (line 42) | func applyCustomHeaders(r *http.Request, headers map[string]string) {
FILE: internal/util/image.go
function CreateWhiteImageBase64 (line 11) | func CreateWhiteImageBase64(aspectRatio string) (string, error) {
FILE: internal/util/provider.go
function GetProviderName (line 33) | func GetProviderName(modelName string) []string {
function ResolveAutoModel (line 71) | func ResolveAutoModel(modelName string) string {
function IsOpenAICompatibilityAlias (line 96) | func IsOpenAICompatibilityAlias(modelName string, cfg *config.Config) bo...
function GetOpenAICompatibilityConfig (line 121) | func GetOpenAICompatibilityConfig(alias string, cfg *config.Config) (*co...
function InArray (line 146) | func InArray(hystack []string, needle string) bool {
function HideAPIKey (line 162) | func HideAPIKey(apiKey string) string {
function MaskAuthorizationHeader (line 182) | func MaskAuthorizationHeader(value string) string {
function MaskSensitiveHeaderValue (line 203) | func MaskSensitiveHeaderValue(key, value string) string {
function MaskSensitiveQuery (line 219) | func MaskSensitiveQuery(raw string) string {
function shouldMaskQueryParam (line 256) | func shouldMaskQueryParam(key string) bool {
FILE: internal/util/proxy.go
function SetProxy (line 17) | func SetProxy(cfg *config.SDKConfig, httpClient *http.Client) *http.Clie...
FILE: internal/util/sanitize_test.go
function TestSanitizeFunctionName (line 7) | func TestSanitizeFunctionName(t *testing.T) {
FILE: internal/util/ssh_helper.go
function getPublicIP (line 31) | func getPublicIP() (string, error) {
function getOutboundIP (line 74) | func getOutboundIP() (string, error) {
function GetIPAddress (line 99) | func GetIPAddress() string {
function PrintSSHTunnelInstructions (line 120) | func PrintSSHTunnelInstructions(port int) {
FILE: internal/util/translator.go
function Walk (line 26) | func Walk(value gjson.Result, path, field string, paths *[]string) {
function RenameKey (line 70) | func RenameKey(jsonStr, oldKeyPath, newKeyPath string) (string, error) {
function FixJSON (line 108) | func FixJSON(input string) string {
function CanonicalToolName (line 224) | func CanonicalToolName(name string) string {
function ToolNameMapFromClaudeRequest (line 232) | func ToolNameMapFromClaudeRequest(rawJSON []byte) map[string]string {
function MapToolName (line 265) | func MapToolName(toolNameMap map[string]string, name string) string {
FILE: internal/util/util.go
function SanitizeFunctionName (line 24) | func SanitizeFunctionName(name string) string {
function SetLogLevel (line 59) | func SetLogLevel(cfg *config.Config) {
function ResolveAuthDir (line 76) | func ResolveAuthDir(authDir string) (string, error) {
function CountAuthFiles (line 98) | func CountAuthFiles[T any](ctx context.Context, store interface {
function WritablePath (line 117) | func WritablePath() string {
FILE: internal/watcher/clients.go
method reloadClients (line 25) | func (w *Watcher) reloadClients(rescanAuth bool, affectedOAuthProviders ...
method addOrUpdateClient (line 136) | func (w *Watcher) addOrUpdateClient(path string) {
method removeClient (line 220) | func (w *Watcher) removeClient(path string) {
method computePerPathUpdatesLocked (line 238) | func (w *Watcher) computePerPathUpdatesLocked(oldByID, newByID map[strin...
function authSliceToMap (line 265) | func authSliceToMap(auths []*coreauth.Auth) map[string]*coreauth.Auth {
method loadFileClients (line 276) | func (w *Watcher) loadFileClients(cfg *config.Config) int {
function BuildAPIKeyClients (line 311) | func BuildAPIKeyClients(cfg *config.Config) (int, int, int, int, int) {
method persistConfigAsync (line 338) | func (w *Watcher) persistConfigAsync() {
method persistAuthAsync (line 351) | func (w *Watcher) persistAuthAsync(message string, paths ...string) {
method stopServerUpdateTimer (line 373) | func (w *Watcher) stopServerUpdateTimer() {
method triggerServerUpdate (line 383) | func (w *Watcher) triggerServerUpdate(cfg *config.Config) {
FILE: internal/watcher/config_reload.go
method stopConfigReloadTimer (line 20) | func (w *Watcher) stopConfigReloadTimer() {
method scheduleConfigReload (line 29) | func (w *Watcher) scheduleConfigReload() {
method reloadConfigIfChanged (line 43) | func (w *Watcher) reloadConfigIfChanged() {
method reloadConfig (line 80) | func (w *Watcher) reloadConfig() bool {
FILE: internal/watcher/diff/auth_diff.go
function BuildAuthChangeDetails (line 13) | func BuildAuthChangeDetails(oldAuth, newAuth *coreauth.Auth) []string {
FILE: internal/watcher/diff/config_diff.go
function BuildConfigChangeDetails (line 14) | func BuildConfigChangeDetails(oldCfg, newCfg *config.Config) []string {
function trimStrings (line 321) | func trimStrings(in []string) []string {
function equalStringMap (line 329) | func equalStringMap(a, b map[string]string) bool {
function formatProxyURL (line 341) | func formatProxyURL(raw string) string {
function equalStringSet (line 369) | func equalStringSet(a, b []string) bool {
function equalUpstreamAPIKeys (line 394) | func equalUpstreamAPIKeys(a, b []config.AmpUpstreamAPIKeyEntry) bool {
FILE: internal/watcher/diff/config_diff_test.go
function TestBuildConfigChangeDetails (line 10) | func TestBuildConfigChangeDetails(t *testing.T) {
function TestBuildConfigChangeDetails_NoChanges (line 99) | func TestBuildConfigChangeDetails_NoChanges(t *testing.T) {
function TestBuildConfigChangeDetails_GeminiVertexHeadersAndForceMappings (line 108) | func TestBuildConfigChangeDetails_GeminiVertexHeadersAndForceMappings(t ...
function TestBuildConfigChangeDetails_ModelPrefixes (line 141) | func TestBuildConfigChangeDetails_ModelPrefixes(t *testing.T) {
function TestBuildConfigChangeDetails_NilSafe (line 178) | func TestBuildConfigChangeDetails_NilSafe(t *testing.T) {
function TestBuildConfigChangeDetails_SecretsAndCounts (line 187) | func TestBuildConfigChangeDetails_SecretsAndCounts(t *testing.T) {
function TestBuildConfigChangeDetails_FlagsAndKeys (line 217) | func TestBuildConfigChangeDetails_FlagsAndKeys(t *testing.T) {
function TestBuildConfigChangeDetails_AllBranches (line 306) | func TestBuildConfigChangeDetails_AllBranches(t *testing.T) {
function TestFormatProxyURL (line 468) | func TestFormatProxyURL(t *testing.T) {
function TestBuildConfigChangeDetails_SecretAndUpstreamUpdates (line 492) | func TestBuildConfigChangeDetails_SecretAndUpstreamUpdates(t *testing.T) {
function TestBuildConfigChangeDetails_CountBranches (line 515) | func TestBuildConfigChangeDetails_CountBranches(t *testing.T) {
function TestTrimStrings (line 533) | func TestTrimStrings(t *testing.T) {
FILE: internal/watcher/diff/model_hash.go
function ComputeOpenAICompatModelsHash (line 15) | func ComputeOpenAICompatModelsHash(models []config.OpenAICompatibilityMo...
function ComputeVertexCompatModelsHash (line 30) | func ComputeVertexCompatModelsHash(models []config.VertexCompatModel) st...
function ComputeClaudeModelsHash (line 45) | func ComputeClaudeModelsHash(models []config.ClaudeModel) string {
function ComputeCodexModelsHash (line 60) | func ComputeCodexModelsHash(models []config.CodexModel) string {
function ComputeGeminiModelsHash (line 75) | func ComputeGeminiModelsHash(models []config.GeminiModel) string {
function ComputeExcludedModelsHash (line 90) | func ComputeExcludedModelsHash(excluded []string) string {
function normalizeModelPairs (line 109) | func normalizeModelPairs(collect func(out func(key string))) []string {
function hashJoined (line 126) | func hashJoined(keys []string) string {
FILE: internal/watcher/diff/model_hash_test.go
function TestComputeOpenAICompatModelsHash_Deterministic (line 9) | func TestComputeOpenAICompatModelsHash_Deterministic(t *testing.T) {
function TestComputeOpenAICompatModelsHash_NormalizesAndDedups (line 28) | func TestComputeOpenAICompatModelsHash_NormalizesAndDedups(t *testing.T) {
function TestComputeVertexCompatModelsHash_DifferentInputs (line 49) | func TestComputeVertexCompatModelsHash_DifferentInputs(t *testing.T) {
function TestComputeVertexCompatModelsHash_IgnoresBlankAndOrder (line 61) | func TestComputeVertexCompatModelsHash_IgnoresBlankAndOrder(t *testing.T) {
function TestComputeClaudeModelsHash_Empty (line 75) | func TestComputeClaudeModelsHash_Empty(t *testing.T) {
function TestComputeCodexModelsHash_Empty (line 84) | func TestComputeCodexModelsHash_Empty(t *testing.T) {
function TestComputeClaudeModelsHash_IgnoresBlankAndDedup (line 93) | func TestComputeClaudeModelsHash_IgnoresBlankAndDedup(t *testing.T) {
function TestComputeCodexModelsHash_IgnoresBlankAndDedup (line 107) | func TestComputeCodexModelsHash_IgnoresBlankAndDedup(t *testing.T) {
function TestComputeExcludedModelsHash_Normalizes (line 121) | func TestComputeExcludedModelsHash_Normalizes(t *testing.T) {
function TestComputeOpenAICompatModelsHash_Empty (line 136) | func TestComputeOpenAICompatModelsHash_Empty(t *testing.T) {
function TestComputeVertexCompatModelsHash_Empty (line 148) | func TestComputeVertexCompatModelsHash_Empty(t *testing.T) {
function TestComputeExcludedModelsHash_Empty (line 160) | func TestComputeExcludedModelsHash_Empty(t *testing.T) {
function TestComputeClaudeModelsHash_Deterministic (line 172) | func TestComputeClaudeModelsHash_Deterministic(t *testing.T) {
function TestComputeCodexModelsHash_Deterministic (line 184) | func TestComputeCodexModelsHash_Deterministic(t *testing.T) {
FILE: internal/watcher/diff/models_summary.go
type GeminiModelsSummary (line 12) | type GeminiModelsSummary struct
type ClaudeModelsSummary (line 17) | type ClaudeModelsSummary struct
type CodexModelsSummary (line 22) | type CodexModelsSummary struct
type VertexModelsSummary (line 27) | type VertexModelsSummary struct
function SummarizeGeminiModels (line 33) | func SummarizeGeminiModels(models []config.GeminiModel) GeminiModelsSumm...
function SummarizeClaudeModels (line 54) | func SummarizeClaudeModels(models []config.ClaudeModel) ClaudeModelsSumm...
function SummarizeCodexModels (line 75) | func SummarizeCodexModels(models []config.CodexModel) CodexModelsSummary {
function SummarizeVertexModels (line 96) | func SummarizeVertexModels(models []config.VertexCompatModel) VertexMode...
FILE: internal/watcher/diff/oauth_excluded.go
type ExcludedModelsSummary (line 13) | type ExcludedModelsSummary struct
function SummarizeExcludedModels (line 19) | func SummarizeExcludedModels(list []string) ExcludedModelsSummary {
function SummarizeOAuthExcludedModels (line 42) | func SummarizeOAuthExcludedModels(entries map[string][]string) map[strin...
function DiffOAuthExcludedModelChanges (line 58) | func DiffOAuthExcludedModelChanges(oldMap, newMap map[string][]string) (...
type AmpModelMappingsSummary (line 90) | type AmpModelMappingsSummary struct
function SummarizeAmpModelMappings (line 96) | func SummarizeAmpModelMappings(mappings []config.AmpModelMapping) AmpMod...
FILE: internal/watcher/diff/oauth_excluded_test.go
function TestSummarizeExcludedModels_NormalizesAndDedupes (line 9) | func TestSummarizeExcludedModels_NormalizesAndDedupes(t *testing.T) {
function TestDiffOAuthExcludedModelChanges (line 22) | func TestDiffOAuthExcludedModelChanges(t *testing.T) {
function TestSummarizeAmpModelMappings (line 42) | func TestSummarizeAmpModelMappings(t *testing.T) {
function TestSummarizeOAuthExcludedModels_NormalizesKeys (line 62) | func TestSummarizeOAuthExcludedModels_NormalizesKeys(t *testing.T) {
function TestSummarizeVertexModels (line 81) | func TestSummarizeVertexModels(t *testing.T) {
function expectContains (line 101) | func expectContains(t *testing.T, list []string, target string) {
FILE: internal/watcher/diff/oauth_model_alias.go
type OAuthModelAliasSummary (line 13) | type OAuthModelAliasSummary struct
function SummarizeOAuthModelAlias (line 19) | func SummarizeOAuthModelAlias(entries map[string][]config.OAuthModelAlia...
function DiffOAuthModelAliasChanges (line 38) | func DiffOAuthModelAliasChanges(oldMap, newMap map[string][]config.OAuth...
function summarizeOAuthModelAliasList (line 70) | func summarizeOAuthModelAliasList(list []config.OAuthModelAlias) OAuthMo...
FILE: internal/watcher/diff/openai_compat.go
function DiffOpenAICompatibility (line 14) | func DiffOpenAICompatibility(oldList, newList []config.OpenAICompatibili...
function describeOpenAICompatibilityUpdate (line 63) | func describeOpenAICompatibilityUpdate(oldEntry, newEntry config.OpenAIC...
function countAPIKeys (line 84) | func countAPIKeys(entry config.OpenAICompatibility) int {
function countOpenAIModels (line 94) | func countOpenAIModels(models []config.OpenAICompatibilityModel) int {
function openAICompatKey (line 107) | func openAICompatKey(entry config.OpenAICompatibility, index int) (strin...
function openAICompatSignature (line 136) | func openAICompatSignature(entry config.OpenAICompatibility) string {
FILE: internal/watcher/diff/openai_compat_test.go
function TestDiffOpenAICompatibility (line 10) | func TestDiffOpenAICompatibility(t *testing.T) {
function TestDiffOpenAICompatibility_RemovedAndUnchanged (line 46) | func TestDiffOpenAICompatibility_RemovedAndUnchanged(t *testing.T) {
function TestOpenAICompatKeyFallbacks (line 70) | func TestOpenAICompatKeyFallbacks(t *testing.T) {
function TestOpenAICompatKey_UsesName (line 93) | func TestOpenAICompatKey_UsesName(t *testing.T) {
function TestOpenAICompatKey_SignatureFallbackWhenOnlyAPIKeys (line 101) | func TestOpenAICompatKey_SignatureFallbackWhenOnlyAPIKeys(t *testing.T) {
function TestOpenAICompatSignature_EmptyReturnsEmpty (line 111) | func TestOpenAICompatSignature_EmptyReturnsEmpty(t *testing.T) {
function TestOpenAICompatSignature_StableAndNormalized (line 117) | func TestOpenAICompatSignature_StableAndNormalized(t *testing.T) {
function TestCountOpenAIModelsSkipsBlanks (line 166) | func TestCountOpenAIModelsSkipsBlanks(t *testing.T) {
function TestOpenAICompatKeyUsesModelNameWhenAliasEmpty (line 179) | func TestOpenAICompatKeyUsesModelNameWhenAliasEmpty(t *testing.T) {
FILE: internal/watcher/dispatcher.go
method setAuthUpdateQueue (line 19) | func (w *Watcher) setAuthUpdateQueue(queue chan<- AuthUpdate) {
method dispatchRuntimeAuthUpdate (line 42) | func (w *Watcher) dispatchRuntimeAuthUpdate(update AuthUpdate) bool {
method refreshAuthState (line 80) | func (w *Watcher) refreshAuthState(force bool) {
method prepareAuthUpdatesLocked (line 99) | func (w *Watcher) prepareAuthUpdatesLocked(auths []*coreauth.Auth, force...
method dispatchAuthUpdates (line 139) | func (w *Watcher) dispatchAuthUpdates(updates []AuthUpdate) {
method authUpdateKey (line 165) | func (w *Watcher) authUpdateKey(update AuthUpdate, ts int64) string {
method dispatchLoop (line 172) | func (w *Watcher) dispatchLoop(ctx context.Context) {
method nextPendingBatch (line 196) | func (w *Watcher) nextPendingBatch(ctx context.Context) ([]AuthUpdate, b...
method getAuthQueue (line 217) | func (w *Watcher) getAuthQueue() chan<- AuthUpdate {
method stopDispatch (line 223) | func (w *Watcher) stopDispatch() {
function authEqual (line 240) | func authEqual(a, b *coreauth.Auth) bool {
function normalizeAuth (line 244) | func normalizeAuth(a *coreauth.Auth) *coreauth.Auth {
function snapshotCoreAuths (line 258) | func snapshotCoreAuths(cfg *config.Config, authDir string) []*coreauth.A...
FILE: internal/watcher/events.go
function matchProvider (line 19) | func matchProvider(provider string, targets []string) (string, bool) {
method start (line 29) | func (w *Watcher) start(ctx context.Context) error {
method processEvents (line 48) | func (w *Watcher) processEvents(ctx context.Context) {
method handleEvent (line 67) | func (w *Watcher) handleEvent(event fsnotify.Event) {
method authFileUnchanged (line 127) | func (w *Watcher) authFileUnchanged(path string) (bool, error) {
method isKnownAuthFile (line 148) | func (w *Watcher) isKnownAuthFile(path string) bool {
method normalizeAuthPath (line 156) | func (w *Watcher) normalizeAuthPath(path string) string {
method shouldDebounceRemove (line 169) | func (w *Watcher) shouldDebounceRemove(normalizedPath string, now time.T...
FILE: internal/watcher/synthesizer/config.go
type ConfigSynthesizer (line 14) | type ConfigSynthesizer struct
method Synthesize (line 22) | func (s *ConfigSynthesizer) Synthesize(ctx *SynthesisContext) ([]*core...
method synthesizeGeminiKeys (line 43) | func (s *ConfigSynthesizer) synthesizeGeminiKeys(ctx *SynthesisContext...
method synthesizeClaudeKeys (line 91) | func (s *ConfigSynthesizer) synthesizeClaudeKeys(ctx *SynthesisContext...
method synthesizeCodexKeys (line 139) | func (s *ConfigSynthesizer) synthesizeCodexKeys(ctx *SynthesisContext)...
method synthesizeOpenAICompat (line 189) | func (s *ConfigSynthesizer) synthesizeOpenAICompat(ctx *SynthesisConte...
method synthesizeVertexCompat (line 276) | func (s *ConfigSynthesizer) synthesizeVertexCompat(ctx *SynthesisConte...
function NewConfigSynthesizer (line 17) | func NewConfigSynthesizer() *ConfigSynthesizer {
FILE: internal/watcher/synthesizer/config_test.go
function TestNewConfigSynthesizer (line 11) | func TestNewConfigSynthesizer(t *testing.T) {
function TestConfigSynthesizer_Synthesize_NilContext (line 18) | func TestConfigSynthesizer_Synthesize_NilContext(t *testing.T) {
function TestConfigSynthesizer_Synthesize_NilConfig (line 29) | func TestConfigSynthesizer_Synthesize_NilConfig(t *testing.T) {
function TestConfigSynthesizer_GeminiKeys (line 45) | func TestConfigSynthesizer_GeminiKeys(t *testing.T) {
function TestConfigSynthesizer_ClaudeKeys (line 157) | func TestConfigSynthesizer_ClaudeKeys(t *testing.T) {
function TestConfigSynthesizer_ClaudeKeys_SkipsEmptyAndHeaders (line 202) | func TestConfigSynthesizer_ClaudeKeys_SkipsEmptyAndHeaders(t *testing.T) {
function TestConfigSynthesizer_CodexKeys (line 228) | func TestConfigSynthesizer_CodexKeys(t *testing.T) {
function TestConfigSynthesizer_CodexKeys_SkipsEmptyAndHeaders (line 268) | func TestConfigSynthesizer_CodexKeys_SkipsEmptyAndHeaders(t *testing.T) {
function TestConfigSynthesizer_OpenAICompat (line 294) | func TestConfigSynthesizer_OpenAICompat(t *testing.T) {
function TestConfigSynthesizer_VertexCompat (line 372) | func TestConfigSynthesizer_VertexCompat(t *testing.T) {
function TestConfigSynthesizer_VertexCompat_SkipsEmptyAndHeaders (line 407) | func TestConfigSynthesizer_VertexCompat_SkipsEmptyAndHeaders(t *testing....
function TestConfigSynthesizer_OpenAICompat_WithModelsHash (line 442) | func TestConfigSynthesizer_OpenAICompat_WithModelsHash(t *testing.T) {
function TestConfigSynthesizer_OpenAICompat_FallbackWithModels (line 479) | func TestConfigSynthesizer_OpenAICompat_FallbackWithModels(t *testing.T) {
function TestConfigSynthesizer_VertexCompat_WithModels (line 514) | func TestConfigSynthesizer_VertexCompat_WithModels(t *testing.T) {
function TestConfigSynthesizer_IDStability (line 545) | func TestConfigSynthesizer_IDStability(t *testing.T) {
function TestConfigSynthesizer_AllProviders (line 574) | func TestConfigSynthesizer_AllProviders(t *testing.T) {
FILE: internal/watcher/synthesizer/context.go
type SynthesisContext (line 10) | type SynthesisContext struct
FILE: internal/watcher/synthesizer/file.go
type FileSynthesizer (line 20) | type FileSynthesizer struct
method Synthesize (line 28) | func (s *FileSynthesizer) Synthesize(ctx *SynthesisContext) ([]*coreau...
function NewFileSynthesizer (line 23) | func NewFileSynthesizer() *FileSynthesizer {
function SynthesizeAuthFile (line 64) | func SynthesizeAuthFile(ctx *SynthesisContext, fullPath string, data []b...
function synthesizeFileAuths (line 68) | func synthesizeFileAuths(ctx *SynthesisContext, fullPath string, data []...
function SynthesizeGeminiVirtualAuths (line 187) | func SynthesizeGeminiVirtualAuths(primary *coreauth.Auth, metadata map[s...
function splitGeminiProjectIDs (line 276) | func splitGeminiProjectIDs(metadata map[string]any) []string {
function buildGeminiVirtualID (line 300) | func buildGeminiVirtualID(baseID, projectID string) string {
function extractExcludedModelsFromMetadata (line 311) | func extractExcludedModelsFromMetadata(metadata map[string]any) []string {
FILE: internal/watcher/synthesizer/file_test.go
function TestNewFileSynthesizer (line 15) | func TestNewFileSynthesizer(t *testing.T) {
function TestFileSynthesizer_Synthesize_NilContext (line 22) | func TestFileSynthesizer_Synthesize_NilContext(t *testing.T) {
function TestFileSynthesizer_Synthesize_EmptyAuthDir (line 33) | func TestFileSynthesizer_Synthesize_EmptyAuthDir(t *testing.T) {
function TestFileSynthesizer_Synthesize_NonExistentDir (line 50) | func TestFileSynthesizer_Synthesize_NonExistentDir(t *testing.T) {
function TestFileSynthesizer_Synthesize_ValidAuthFile (line 67) | func TestFileSynthesizer_Synthesize_ValidAuthFile(t *testing.T) {
function TestFileSynthesizer_Synthesize_GeminiProviderMapping (line 124) | func TestFileSynthesizer_Synthesize_GeminiProviderMapping(t *testing.T) {
function TestFileSynthesizer_Synthesize_SkipsInvalidFiles (line 159) | func TestFileSynthesizer_Synthesize_SkipsInvalidFiles(t *testing.T) {
function TestFileSynthesizer_Synthesize_SkipsDirectories (line 192) | func TestFileSynthesizer_Synthesize_SkipsDirectories(t *testing.T) {
function TestFileSynthesizer_Synthesize_RelativeID (line 223) | func TestFileSynthesizer_Synthesize_RelativeID(t *testing.T) {
function TestFileSynthesizer_Synthesize_PrefixValidation (line 255) | func TestFileSynthesizer_Synthesize_PrefixValidation(t *testing.T) {
function TestFileSynthesizer_Synthesize_PriorityParsing (line 300) | func TestFileSynthesizer_Synthesize_PriorityParsing(t *testing.T) {
function TestFileSynthesizer_Synthesize_OAuthExcludedModelsMerged (line 372) | func TestFileSynthesizer_Synthesize_OAuthExcludedModelsMerged(t *testing...
function TestSynthesizeGeminiVirtualAuths_NilInputs (line 411) | func TestSynthesizeGeminiVirtualAuths_NilInputs(t *testing.T) {
function TestSynthesizeGeminiVirtualAuths_SingleProject (line 425) | func TestSynthesizeGeminiVirtualAuths_SingleProject(t *testing.T) {
function TestSynthesizeGeminiVirtualAuths_MultiProject (line 444) | func TestSynthesizeGeminiVirtualAuths_MultiProject(t *testing.T) {
function TestSynthesizeGeminiVirtualAuths_EmptyProviderAndLabel (line 521) | func TestSynthesizeGeminiVirtualAuths_EmptyProviderAndLabel(t *testing.T) {
function TestSynthesizeGeminiVirtualAuths_NilPrimaryAttributes (line 552) | func TestSynthesizeGeminiVirtualAuths_NilPrimaryAttributes(t *testing.T) {
function TestSplitGeminiProjectIDs (line 580) | func TestSplitGeminiProjectIDs(t *testing.T) {
function TestFileSynthesizer_Synthesize_MultiProjectGemini (line 639) | func TestFileSynthesizer_Synthesize_MultiProjectGemini(t *testing.T) {
function TestBuildGeminiVirtualID (line 699) | func TestBuildGeminiVirtualID(t *testing.T) {
function TestSynthesizeGeminiVirtualAuths_NotePropagated (line 748) | func TestSynthesizeGeminiVirtualAuths_NotePropagated(t *testing.T) {
function TestSynthesizeGeminiVirtualAuths_NoteAbsentWhenEmpty (line 783) | func TestSynthesizeGeminiVirtualAuths_NoteAbsentWhenEmpty(t *testing.T) {
function TestFileSynthesizer_Synthesize_NoteParsing (line 813) | func TestFileSynthesizer_Synthesize_NoteParsing(t *testing.T) {
function TestFileSynthesizer_Synthesize_MultiProjectGeminiWithNote (line 895) | func TestFileSynthesizer_Synthesize_MultiProjectGeminiWithNote(t *testin...
FILE: internal/watcher/synthesizer/helpers.go
type StableIDGenerator (line 18) | type StableIDGenerator struct
method Next (line 29) | func (g *StableIDGenerator) Next(kind string, parts ...string) (string...
function NewStableIDGenerator (line 23) | func NewStableIDGenerator() *StableIDGenerator {
function ApplyAuthExcludedModelsMeta (line 58) | func ApplyAuthExcludedModelsMeta(auth *coreauth.Auth, cfg *config.Config...
function addConfigHeadersToAttrs (line 108) | func addConfigHeadersToAttrs(headers map[string]string, attrs map[string...
FILE: internal/watcher/synthesizer/helpers_test.go
function TestNewStableIDGenerator (line 13) | func TestNewStableIDGenerator(t *testing.T) {
function TestStableIDGenerator_Next (line 23) | func TestStableIDGenerator_Next(t *testing.T) {
function TestStableIDGenerator_Stability (line 68) | func TestStableIDGenerator_Stability(t *testing.T) {
function TestStableIDGenerator_CollisionHandling (line 80) | func TestStableIDGenerator_CollisionHandling(t *testing.T) {
function TestStableIDGenerator_NilReceiver (line 97) | func TestStableIDGenerator_NilReceiver(t *testing.T) {
function TestApplyAuthExcludedModelsMeta (line 109) | func TestApplyAuthExcludedModelsMeta(t *testing.T) {
function TestApplyAuthExcludedModelsMeta_OAuthMergeWritesCombinedModels (line 204) | func TestApplyAuthExcludedModelsMeta_OAuthMergeWritesCombinedModels(t *t...
function TestAddConfigHeadersToAttrs (line 228) | func TestAddConfigHeadersToAttrs(t *testing.T) {
FILE: internal/watcher/synthesizer/interface.go
type AuthSynthesizer (line 12) | type AuthSynthesizer interface
FILE: internal/watcher/watcher.go
type storePersister (line 22) | type storePersister interface
type authDirProvider (line 27) | type authDirProvider interface
type Watcher (line 32) | type Watcher struct
method Start (line 120) | func (w *Watcher) Start(ctx context.Context) error {
method Stop (line 125) | func (w *Watcher) Stop() error {
method SetConfig (line 134) | func (w *Watcher) SetConfig(cfg *config.Config) {
method SetAuthUpdateQueue (line 142) | func (w *Watcher) SetAuthUpdateQueue(queue chan<- AuthUpdate) {
method DispatchRuntimeAuthUpdate (line 149) | func (w *Watcher) DispatchRuntimeAuthUpdate(update AuthUpdate) bool {
method SnapshotCoreAuths (line 154) | func (w *Watcher) SnapshotCoreAuths() []*coreauth.Auth {
type AuthUpdateAction (line 65) | type AuthUpdateAction
constant AuthUpdateActionAdd (line 68) | AuthUpdateActionAdd AuthUpdateAction = "add"
constant AuthUpdateActionModify (line 69) | AuthUpdateActionModify AuthUpdateAction = "modify"
constant AuthUpdateActionDelete (line 70) | AuthUpdateActionDelete AuthUpdateAction = "delete"
type AuthUpdate (line 74) | type AuthUpdate struct
constant replaceCheckDelay (line 83) | replaceCheckDelay = 50 * time.Millisecond
constant configReloadDebounce (line 84) | configReloadDebounce = 150 * time.Millisecond
constant authRemoveDebounceWindow (line 85) | authRemoveDebounceWindow = 1 * time.Second
constant serverUpdateDebounce (line 86) | serverUpdateDebounce = 1 * time.Second
function NewWatcher (line 90) | func NewWatcher(configPath, authDir string, reloadCallback func(*config....
FILE: internal/watcher/watcher_test.go
function TestApplyAuthExcludedModelsMeta_APIKey (line 25) | func TestApplyAuthExcludedModelsMeta_APIKey(t *testing.T) {
function TestApplyAuthExcludedModelsMeta_OAuthProvider (line 41) | func TestApplyAuthExcludedModelsMeta_OAuthProvider(t *testing.T) {
function TestBuildAPIKeyClientsCounts (line 63) | func TestBuildAPIKeyClientsCounts(t *testing.T) {
function TestNormalizeAuthStripsTemporalFields (line 82) | func TestNormalizeAuthStripsTemporalFields(t *testing.T) {
function TestMatchProvider (line 107) | func TestMatchProvider(t *testing.T) {
function TestSnapshotCoreAuths_ConfigAndAuthFiles (line 116) | func TestSnapshotCoreAuths_ConfigAndAuthFiles(t *testing.T) {
function TestReloadConfigIfChanged_TriggersOnChangeAndSkipsUnchanged (line 210) | func TestReloadConfigIfChanged_TriggersOnChangeAndSkipsUnchanged(t *test...
function TestStartAndStopSuccess (line 267) | func TestStartAndStopSuccess(t *testing.T) {
function TestStartFailsWhenConfigMissing (line 302) | func TestStartFailsWhenConfigMissing(t *testing.T) {
function TestDispatchRuntimeAuthUpdateEnqueuesAndUpdatesState (line 324) | func TestDispatchRuntimeAuthUpdateEnqueuesAndUpdatesState(t *testing.T) {
function TestAddOrUpdateClientSkipsUnchanged (line 363) | func TestAddOrUpdateClientSkipsUnchanged(t *testing.T) {
function TestAddOrUpdateClientTriggersReloadAndHash (line 390) | func TestAddOrUpdateClientTriggersReloadAndHash(t *testing.T) {
function TestRemoveClientRemovesHash (line 419) | func TestRemoveClientRemovesHash(t *testing.T) {
function TestAuthFileEventsDoNotInvokeSnapshotCoreAuths (line 444) | func TestAuthFileEventsDoNotInvokeSnapshotCoreAuths(t *testing.T) {
function TestAuthSliceToMap (line 475) | func TestAuthSliceToMap(t *testing.T) {
function TestTriggerServerUpdateCancelsPendingTimerOnImmediate (line 546) | func TestTriggerServerUpdateCancelsPendingTimerOnImmediate(t *testing.T) {
function TestShouldDebounceRemove (line 586) | func TestShouldDebounceRemove(t *testing.T) {
function TestAuthFileUnchangedUsesHash (line 606) | func TestAuthFileUnchangedUsesHash(t *testing.T) {
function TestAuthFileUnchangedEmptyAndMissing (line 636) | func TestAuthFileUnchangedEmptyAndMissing(t *testing.T) {
function TestReloadClientsCachesAuthHashes (line 658) | func TestReloadClientsCachesAuthHashes(t *testing.T) {
function TestReloadClientsLogsConfigDiffs (line 678) | func TestReloadClientsLogsConfigDiffs(t *testing.T) {
function TestReloadClientsHandlesNilConfig (line 697) | func TestReloadClientsHandlesNilConfig(t *testing.T) {
function TestReloadClientsFiltersProvidersWithNilCurrentAuths (line 702) | func TestReloadClientsFiltersProvidersWithNilCurrentAuths(t *testing.T) {
function TestSetAuthUpdateQueueNilResetsDispatch (line 714) | func TestSetAuthUpdateQueueNilResetsDispatch(t *testing.T) {
function TestPersistAsyncEarlyReturns (line 727) | func TestPersistAsyncEarlyReturns(t *testing.T) {
type errorPersister (line 737) | type errorPersister struct
method PersistConfig (line 742) | func (p *errorPersister) PersistConfig(context.Context) error {
method PersistAuthFiles (line 747) | func (p *errorPersister) PersistAuthFiles(context.Context, string, ......
function TestPersistAsyncErrorPaths (line 752) | func TestPersistAsyncErrorPaths(t *testing.T) {
function TestStopConfigReloadTimerSafeWhenNil (line 766) | func TestStopConfigReloadTimerSafeWhenNil(t *testing.T) {
function TestHandleEventRemovesAuthFile (line 776) | func TestHandleEventRemovesAuthFile(t *testing.T) {
function TestDispatchAuthUpdatesFlushesQueue (line 808) | func TestDispatchAuthUpdatesFlushesQueue(t *testing.T) {
function TestDispatchLoopExitsOnContextDoneWhileSending (line 833) | func TestDispatchLoopExitsOnContextDoneWhileSending(t *testing.T) {
function TestProcessEventsHandlesEventErrorAndChannelClose (line 860) | func TestProcessEventsHandlesEventErrorAndChannelClose(t *testing.T) {
function TestProcessEventsReturnsWhenErrorsChannelClosed (line 893) | func TestProcessEventsReturnsWhenErrorsChannelClosed(t *testing.T) {
function TestHandleEventIgnoresUnrelatedFiles (line 919) | func TestHandleEventIgnoresUnrelatedFiles(t *testing.T) {
function TestHandleEventConfigChangeSchedulesReload (line 945) | func TestHandleEventConfigChangeSchedulesReload(t *testing.T) {
function TestHandleEventAuthWriteTriggersUpdate (line 973) | func TestHandleEventAuthWriteTriggersUpdate(t *testing.T) {
function TestHandleEventRemoveDebounceSkips (line 1003) | func TestHandleEventRemoveDebounceSkips(t *testing.T) {
function TestHandleEventAtomicReplaceUnchangedSkips (line 1033) | func TestHandleEventAtomicReplaceUnchangedSkips(t *testing.T) {
function TestHandleEventAtomicReplaceChangedTriggersUpdate (line 1066) | func TestHandleEventAtomicReplaceChangedTriggersUpdate(t *testing.T) {
function TestHandleEventRemoveUnknownFileIgnored (line 1100) | func TestHandleEventRemoveUnknownFileIgnored(t *testing.T) {
function TestHandleEventRemoveKnownFileDeletes (line 1127) | func TestHandleEventRemoveKnownFileDeletes(t *testing.T) {
function TestNormalizeAuthPathAndDebounceCleanup (line 1158) | func TestNormalizeAuthPathAndDebounceCleanup(t *testing.T) {
function TestRefreshAuthStateDispatchesRuntimeAuths (line 1185) | func TestRefreshAuthStateDispatchesRuntimeAuths(t *testing.T) {
function TestAddOrUpdateClientEdgeCases (line 1214) | func TestAddOrUpdateClientEdgeCases(t *testing.T) {
function TestLoadFileClientsWalkError (line 1245) | func TestLoadFileClientsWalkError(t *testing.T) {
function TestReloadConfigIfChangedHandlesMissingAndEmpty (line 1266) | func TestReloadConfigIfChangedHandlesMissingAndEmpty(t *testing.T) {
function TestReloadConfigUsesMirroredAuthDir (line 1287) | func TestReloadConfigUsesMirroredAuthDir(t *testing.T) {
function TestReloadConfigFiltersAffectedOAuthProviders (line 1318) | func TestReloadConfigFiltersAffectedOAuthProviders(t *testing.T) {
function TestReloadConfigTriggersCallbackForMaxRetryCredentialsChange (line 1384) | func TestReloadConfigTriggersCallbackForMaxRetryCredentialsChange(t *tes...
function TestStartFailsWhenAuthDirMissing (line 1445) | func TestStartFailsWhenAuthDirMissing(t *testing.T) {
function TestDispatchRuntimeAuthUpdateReturnsFalseWithoutQueue (line 1468) | func TestDispatchRuntimeAuthUpdateReturnsFalseWithoutQueue(t *testing.T) {
function TestNormalizeAuthNil (line 1478) | func TestNormalizeAuthNil(t *testing.T) {
type stubStore (line 1485) | type stubStore struct
method List (line 1493) | func (s *stubStore) List(context.Context) ([]*coreauth.Auth, error) { ...
method Save (line 1494) | func (s *stubStore) Save(context.Context, *coreauth.Auth) (string, err...
method Delete (line 1497) | func (s *stubStore) Delete(context.Context, string) error { return nil }
method PersistConfig (line 1498) | func (s *stubStore) PersistConfig(context.Context) error {
method PersistAuthFiles (line 1502) | func (s *stubStore) PersistAuthFiles(_ context.Context, message string...
method AuthDir (line 1508) | func (s *stubStore) AuthDir() string { return s.authDir }
function TestNewWatcherDetectsPersisterAndAuthDir (line 1510) | func TestNewWatcherDetectsPersisterAndAuthDir(t *testing.T) {
function TestPersistConfigAndAuthAsyncInvokePersister (line 1529) | func TestPersistConfigAndAuthAsyncInvokePersister(t *testing.T) {
function TestScheduleConfigReloadDebounces (line 1553) | func TestScheduleConfigReloadDebounces(t *testing.T) {
function TestPrepareAuthUpdatesLockedForceAndDelete (line 1582) | func TestPrepareAuthUpdatesLockedForceAndDelete(t *testing.T) {
function TestAuthEqualIgnoresTemporalFields (line 1606) | func TestAuthEqualIgnoresTemporalFields(t *testing.T) {
function TestDispatchLoopExitsWhenQueueNilAndContextCanceled (line 1615) | func TestDispatchLoopExitsWhenQueueNilAndContextCanceled(t *testing.T) {
function TestReloadClientsFiltersOAuthProvidersWithoutRescan (line 1643) | func TestReloadClientsFiltersOAuthProvidersWithoutRescan(t *testing.T) {
function TestScheduleProcessEventsStopsOnContextDone (line 1667) | func TestScheduleProcessEventsStopsOnContextDone(t *testing.T) {
function hexString (line 1691) | func hexString(data []byte) string {
FILE: internal/wsrelay/http.go
type HTTPRequest (line 15) | type HTTPRequest struct
type HTTPResponse (line 23) | type HTTPResponse struct
type StreamEvent (line 30) | type StreamEvent struct
method NonStream (line 39) | func (m *Manager) NonStream(ctx context.Context, provider string, req *H...
method Stream (line 115) | func (m *Manager) Stream(ctx context.Context, provider string, req *HTTP...
function encodeRequest (line 177) | func encodeRequest(req *HTTPRequest) map[string]any {
function decodeResponse (line 193) | func decodeResponse(payload map[string]any) *HTTPResponse {
function decodeChunk (line 225) | func decodeChunk(payload map[string]any) []byte {
function decodeError (line 235) | func decodeError(payload map[string]any) error {
FILE: internal/wsrelay/manager.go
type Manager (line 18) | type Manager struct
method Path (line 83) | func (m *Manager) Path() string {
method Handler (line 91) | func (m *Manager) Handler() http.Handler {
method Stop (line 96) | func (m *Manager) Stop(_ context.Context) error {
method handleWebsocket (line 114) | func (m *Manager) handleWebsocket(w http.ResponseWriter, r *http.Reque...
method Send (line 164) | func (m *Manager) Send(ctx context.Context, provider string, msg Messa...
method session (line 172) | func (m *Manager) session(provider string) *session {
method handleSessionClosed (line 180) | func (m *Manager) handleSessionClosed(s *session, cause error) {
type Options (line 34) | type Options struct
function NewManager (line 45) | func NewManager(opts Options) *Manager {
function randomProviderName (line 195) | func randomProviderName() string {
FILE: internal/wsrelay/message.go
type Message (line 4) | type Message struct
constant MessageTypeHTTPReq (line 12) | MessageTypeHTTPReq = "http_request"
constant MessageTypeHTTPResp (line 14) | MessageTypeHTTPResp = "http_response"
constant MessageTypeStreamStart (line 16) | MessageTypeStreamStart = "stream_start"
constant MessageTypeStreamChunk (line 18) | MessageTypeStreamChunk = "stream_chunk"
constant MessageTypeStreamEnd (line 20) | MessageTypeStreamEnd = "stream_end"
constant MessageTypeError (line 22) | MessageTypeError = "error"
constant MessageTypePing (line 24) | MessageTypePing = "ping"
constant MessageTypePong (line 26) | MessageTypePong = "pong"
FILE: internal/wsrelay/session.go
constant readTimeout (line 14) | readTimeout = 60 * time.Second
constant writeTimeout (line 15) | writeTimeout = 10 * time.Second
constant maxInboundMessageLen (line 16) | maxInboundMessageLen = 64 << 20
constant heartbeatInterval (line 17) | heartbeatInterval = 30 * time.Second
type pendingRequest (line 22) | type pendingRequest struct
method close (line 27) | func (pr *pendingRequest) close() {
type session (line 36) | type session struct
method startHeartbeat (line 65) | func (s *session) startHeartbeat() {
method run (line 89) | func (s *session) run(ctx context.Context) {
method dispatch (line 101) | func (s *session) dispatch(msg Message) {
method send (line 124) | func (s *session) send(ctx context.Context, msg Message) error {
method request (line 141) | func (s *session) request(ctx context.Context, msg Message) (<-chan Me...
method cleanup (line 169) | func (s *session) cleanup(cause error) {
function newSession (line 47) | func newSession(conn *websocket.Conn, mgr *Manager, id string) *session {
FILE: sdk/access/errors.go
type AuthErrorCode (line 10) | type AuthErrorCode
constant AuthErrorCodeNoCredentials (line 13) | AuthErrorCodeNoCredentials AuthErrorCode = "no_credentials"
constant AuthErrorCodeInvalidCredential (line 14) | AuthErrorCodeInvalidCredential AuthErrorCode = "invalid_credential"
constant AuthErrorCodeNotHandled (line 15) | AuthErrorCodeNotHandled AuthErrorCode = "not_handled"
constant AuthErrorCodeInternal (line 16) | AuthErrorCodeInternal AuthErrorCode = "internal_error"
type AuthError (line 20) | type AuthError struct
method Error (line 27) | func (e *AuthError) Error() string {
method Unwrap (line 41) | func (e *AuthError) Unwrap() error {
method HTTPStatusCode (line 49) | func (e *AuthError) HTTPStatusCode() int {
function newAuthError (line 56) | func newAuthError(code AuthErrorCode, message string, statusCode int, ca...
function NewNoCredentialsError (line 65) | func NewNoCredentialsError() *AuthError {
function NewInvalidCredentialError (line 69) | func NewInvalidCredentialError() *AuthError {
function NewNotHandledError (line 73) | func NewNotHandledError() *AuthError {
function NewInternalAuthError (line 77) | func NewInternalAuthError(message string, cause error) *AuthError {
function IsAuthErrorCode (line 85) | func IsAuthErrorCode(authErr *AuthError, code AuthErrorCode) bool {
FILE: sdk/access/manager.go
type Manager (line 10) | type Manager struct
method SetProviders (line 21) | func (m *Manager) SetProviders(providers []Provider) {
method Providers (line 33) | func (m *Manager) Providers() []Provider {
method Authenticate (line 45) | func (m *Manager) Authenticate(ctx context.Context, r *http.Request) (...
function NewManager (line 16) | func NewManager() *Manager {
FILE: sdk/access/registry.go
type Provider (line 11) | type Provider interface
type Result (line 17) | type Result struct
function RegisterProvider (line 30) | func RegisterProvider(typ string, provider Provider) {
function UnregisterProvider (line 45) | func UnregisterProvider(typ string) {
function RegisteredProviders (line 67) | func RegisteredProviders() []Provider {
FILE: sdk/access/types.go
type AccessConfig (line 4) | type AccessConfig struct
type AccessProvider (line 10) | type AccessProvider struct
constant AccessProviderTypeConfigAPIKey (line 29) | AccessProviderTypeConfigAPIKey = "config-api-key"
constant DefaultAccessProviderName (line 32) | DefaultAccessProviderName = "config-inline"
function MakeInlineAPIKeyProvider (line 37) | func MakeInlineAPIKeyProvider(keys []string) *AccessProvider {
FILE: sdk/api/handlers/claude/code_handlers.go
type ClaudeCodeAPIHandler (line 29) | type ClaudeCodeAPIHandler struct
method HandlerType (line 48) | func (h *ClaudeCodeAPIHandler) HandlerType() string {
method Models (line 53) | func (h *ClaudeCodeAPIHandler) Models() []map[string]any {
method ClaudeMessages (line 65) | func (h *ClaudeCodeAPIHandler) ClaudeMessages(c *gin.Context) {
method ClaudeCountTokens (line 94) | func (h *ClaudeCodeAPIHandler) ClaudeCountTokens(c *gin.Context) {
method ClaudeModels (line 131) | func (h *ClaudeCodeAPIHandler) ClaudeModels(c *gin.Context) {
method handleNonStreamingResponse (line 161) | func (h *ClaudeCodeAPIHandler) handleNonStreamingResponse(c *gin.Conte...
method handleStreamingResponse (line 210) | func (h *ClaudeCodeAPIHandler) handleStreamingResponse(c *gin.Context,...
method forwardClaudeStream (line 285) | func (h *ClaudeCodeAPIHandler) forwardClaudeStream(c *gin.Context, flu...
method toClaudeError (line 319) | func (h *ClaudeCodeAPIHandler) toClaudeError(msg *interfaces.ErrorMess...
function NewClaudeCodeAPIHandler (line 41) | func NewClaudeCodeAPIHandler(apiHandlers *handlers.BaseAPIHandler) *Clau...
type claudeErrorDetail (line 309) | type claudeErrorDetail struct
type claudeErrorResponse (line 314) | type claudeErrorResponse struct
FILE: sdk/api/handlers/gemini/gemini-cli_handlers.go
type GeminiCLIAPIHandler (line 27) | type GeminiCLIAPIHandler struct
method HandlerType (line 40) | func (h *GeminiCLIAPIHandler) HandlerType() string {
method Models (line 45) | func (h *GeminiCLIAPIHandler) Models() []map[string]any {
method CLIHandler (line 51) | func (h *GeminiCLIAPIHandler) CLIHandler(c *gin.Context) {
method handleInternalStreamGenerateContent (line 136) | func (h *GeminiCLIAPIHandler) handleInternalStreamGenerateContent(c *g...
method handleInternalGenerateContent (line 170) | func (h *GeminiCLIAPIHandler) handleInternalGenerateContent(c *gin.Con...
method forwardCLIStream (line 187) | func (h *GeminiCLIAPIHandler) forwardCLIStream(c *gin.Context, flusher...
function NewGeminiCLIAPIHandler (line 33) | func NewGeminiCLIAPIHandler(apiHandlers *handlers.BaseAPIHandler) *Gemin...
FILE: sdk/api/handlers/gemini/gemini_handlers.go
type GeminiAPIHandler (line 24) | type GeminiAPIHandler struct
method HandlerType (line 37) | func (h *GeminiAPIHandler) HandlerType() string {
method Models (line 42) | func (h *GeminiAPIHandler) Models() []map[string]any {
method GeminiModels (line 50) | func (h *GeminiAPIHandler) GeminiModels(c *gin.Context) {
method GeminiGetHandler (line 82) | func (h *GeminiAPIHandler) GeminiGetHandler(c *gin.Context) {
method GeminiHandler (line 129) | func (h *GeminiAPIHandler) GeminiHandler(c *gin.Context) {
method handleStreamGenerateContent (line 175) | func (h *GeminiAPIHandler) handleStreamGenerateContent(c *gin.Context,...
method handleCountTokens (line 263) | func (h *GeminiAPIHandler) handleCountTokens(c *gin.Context, modelName...
method handleGenerateContent (line 287) | func (h *GeminiAPIHandler) handleGenerateContent(c *gin.Context, model...
method forwardGeminiStream (line 304) | func (h *GeminiAPIHandler) forwardGeminiStream(c *gin.Context, flusher...
function NewGeminiAPIHandler (line 30) | func NewGeminiAPIHandler(apiHandlers *handlers.BaseAPIHandler) *GeminiAP...
FILE: sdk/api/handlers/handlers.go
type ErrorResponse (line 30) | type ErrorResponse struct
type ErrorDetail (line 37) | type ErrorDetail struct
constant idempotencyKeyMetadataKey (line 48) | idempotencyKeyMetadataKey = "idempotency_key"
constant defaultStreamingKeepAliveSeconds (line 51) | defaultStreamingKeepAliveSeconds = 0
constant defaultStreamingBootstrapRetries (line 52) | defaultStreamingBootstrapRetries = 0
type pinnedAuthContextKey (line 55) | type pinnedAuthContextKey struct
type selectedAuthCallbackContextKey (line 56) | type selectedAuthCallbackContextKey struct
type executionSessionContextKey (line 57) | type executionSessionContextKey struct
function WithPinnedAuthID (line 60) | func WithPinnedAuthID(ctx context.Context, authID string) context.Context {
function WithSelectedAuthIDCallback (line 72) | func WithSelectedAuthIDCallback(ctx context.Context, callback func(strin...
function WithExecutionSessionID (line 83) | func WithExecutionSessionID(ctx context.Context, sessionID string) conte...
function BuildErrorResponseBody (line 96) | func BuildErrorResponseBody(status int, errText string) []byte {
function StreamingKeepAliveInterval (line 146) | func StreamingKeepAliveInterval(cfg *config.SDKConfig) time.Duration {
function NonStreamingKeepAliveInterval (line 159) | func NonStreamingKeepAliveInterval(cfg *config.SDKConfig) time.Duration {
function StreamingBootstrapRetries (line 171) | func StreamingBootstrapRetries(cfg *config.SDKConfig) int {
function PassthroughHeadersEnabled (line 184) | func PassthroughHeadersEnabled(cfg *config.SDKConfig) bool {
function requestExecutionMetadata (line 188) | func requestExecutionMetadata(ctx context.Context) map[string]any {
function pinnedAuthIDFromContext (line 214) | func pinnedAuthIDFromContext(ctx context.Context) string {
function selectedAuthIDCallbackFromContext (line 229) | func selectedAuthIDCallbackFromContext(ctx context.Context) func(string) {
function executionSessionIDFromContext (line 240) | func executionSessionIDFromContext(ctx context.Context) string {
type BaseAPIHandler (line 258) | type BaseAPIHandler struct
method UpdateClients (line 288) | func (h *BaseAPIHandler) UpdateClients(cfg *config.SDKConfig) { h.Cfg ...
method GetAlt (line 298) | func (h *BaseAPIHandler) GetAlt(c *gin.Context) string {
method GetContextWithCancel (line 323) | func (h *BaseAPIHandler) GetContextWithCancel(handler interfaces.APIHa...
method StartNonStreamingKeepAlive (line 396) | func (h *BaseAPIHandler) StartNonStreamingKeepAlive(c *gin.Context, ct...
method ExecuteWithAuthManager (line 470) | func (h *BaseAPIHandler) ExecuteWithAuthManager(ctx context.Context, h...
method ExecuteCountWithAuthManager (line 516) | func (h *BaseAPIHandler) ExecuteCountWithAuthManager(ctx context.Conte...
method ExecuteStreamWithAuthManager (line 563) | func (h *BaseAPIHandler) ExecuteStreamWithAuthManager(ctx context.Cont...
method getRequestDetails (line 777) | func (h *BaseAPIHandler) getRequestDetails(modelName string) (provider...
method WriteErrorResponse (line 843) | func (h *BaseAPIHandler) WriteErrorResponse(c *gin.Context, msg *inter...
method LoggingAPIResponseError (line 892) | func (h *BaseAPIHandler) LoggingAPIResponseError(ctx context.Context, ...
function NewBaseAPIHandlers (line 275) | func NewBaseAPIHandlers(cfg *config.SDKConfig, authManager *coreauth.Man...
function appendAPIResponse (line 442) | func appendAPIResponse(c *gin.Context, data []byte) {
function validateSSEDataJSON (line 736) | func validateSSEDataJSON(chunk []byte) error {
function statusFromError (line 765) | func statusFromError(err error) int {
function cloneBytes (line 813) | func cloneBytes(src []byte) []byte {
function cloneHeader (line 822) | func cloneHeader(src http.Header) http.Header {
function replaceHeader (line 833) | func replaceHeader(dst http.Header, src http.Header) {
type APIHandlerCancelFunc (line 910) | type APIHandlerCancelFunc
FILE: sdk/api/handlers/handlers_error_response_test.go
function TestWriteErrorResponse_AddonHeadersDisabledByDefault (line 15) | func TestWriteErrorResponse_AddonHeadersDisabledByDefault(t *testing.T) {
function TestWriteErrorResponse_AddonHeadersEnabled (line 42) | func TestWriteErrorResponse_AddonHeadersEnabled(t *testing.T) {
FILE: sdk/api/handlers/handlers_request_details_test.go
function TestGetRequestDetails_PreservesSuffix (line 13) | func TestGetRequestDetails_PreservesSuffix(t *testing.T) {
FILE: sdk/api/handlers/handlers_stream_bootstrap_test.go
type failOnceStreamExecutor (line 15) | type failOnceStreamExecutor struct
method Identifier (line 20) | func (e *failOnceStreamExecutor) Identifier() string { return "codex" }
method Execute (line 22) | func (e *failOnceStreamExecutor) Execute(context.Context, *coreauth.Au...
method ExecuteStream (line 26) | func (e *failOnceStreamExecutor) ExecuteStream(context.Context, *corea...
method Refresh (line 57) | func (e *failOnceStreamExecutor) Refresh(ctx context.Context, auth *co...
method CountTokens (line 61) | func (e *failOnceStreamExecutor) CountTokens(context.Context, *coreaut...
method HttpRequest (line 65) | func (e *failOnceStreamExecutor) HttpRequest(ctx context.Context, auth...
method Calls (line 73) | func (e *failOnceStreamExecutor) Calls() int {
type payloadThenErrorStreamExecutor (line 79) | type payloadThenErrorStreamExecutor struct
method Identifier (line 84) | func (e *payloadThenErrorStreamExecutor) Identifier() string { return ...
method Execute (line 86) | func (e *payloadThenErrorStreamExecutor) Execute(context.Context, *cor...
method ExecuteStream (line 90) | func (e *payloadThenErrorStreamExecutor) ExecuteStream(context.Context...
method Refresh (line 109) | func (e *payloadThenErrorStreamExecutor) Refresh(ctx context.Context, ...
method CountTokens (line 113) | func (e *payloadThenErrorStreamExecutor) CountTokens(context.Context, ...
method HttpRequest (line 117) | func (e *payloadThenErrorStreamExecutor) HttpRequest(ctx context.Conte...
method Calls (line 125) | func (e *payloadThenErrorStreamExecutor) Calls() int {
type authAwareStreamExecutor (line 131) | type authAwareStreamExecutor struct
method Identifier (line 168) | func (e *authAwareStreamExecutor) Identifier() string { return "codex" }
method Execute (line 170) | func (e *authAwareStreamExecutor) Execute(context.Context, *coreauth.A...
method ExecuteStream (line 174) | func (e *authAwareStreamExecutor) ExecuteStream(ctx context.Context, a...
method Refresh (line 208) | func (e *authAwareStreamExecutor) Refresh(ctx context.Context, auth *c...
method CountTokens (line 212) | func (e *authAwareStreamExecutor) CountTokens(context.Context, *coreau...
method HttpRequest (line 216) | func (e *authAwareStreamExecutor) HttpRequest(ctx context.Context, aut...
method Calls (line 224) | func (e *authAwareStreamExecutor) Calls() int {
method AuthIDs (line 230) | func (e *authAwareStreamExecutor) AuthIDs() []string {
type invalidJSONStreamExecutor (line 137) | type invalidJSONStreamExecutor struct
method Identifier (line 139) | func (e *invalidJSONStreamExecutor) Identifier() string { return "code...
method Execute (line 141) | func (e *invalidJSONStreamExecutor) Execute(context.Context, *coreauth...
method ExecuteStream (line 145) | func (e *invalidJSONStreamExecutor) ExecuteStream(context.Context, *co...
method Refresh (line 152) | func (e *invalidJSONStreamExecutor) Refresh(ctx context.Context, auth ...
method CountTokens (line 156) | func (e *invalidJSONStreamExecutor) CountTokens(context.Context, *core...
method HttpRequest (line 160) | func (e *invalidJSONStreamExecutor) HttpRequest(ctx context.Context, a...
function TestExecuteStreamWithAuthManager_RetriesBeforeFirstByte (line 238) | func TestExecuteStreamWithAuthManager_RetriesBeforeFirstByte(t *testing....
function TestExecuteStreamWithAuthManager_HeaderPassthroughDisabledByDefault (line 304) | func TestExecuteStreamWithAuthManager_HeaderPassthroughDisabledByDefault...
function TestExecuteStreamWithAuthManager_DoesNotRetryAfterFirstByte (line 364) | func TestExecuteStreamWithAuthManager_DoesNotRetryAfterFirstByte(t *test...
function TestExecuteStreamWithAuthManager_PinnedAuthKeepsSameUpstream (line 434) | func TestExecuteStreamWithAuthManager_PinnedAuthKeepsSameUpstream(t *tes...
function TestExecuteStreamWithAuthManager_SelectedAuthCallbackReceivesAuthID (line 506) | func TestExecuteStreamWithAuthManager_SelectedAuthCallbackReceivesAuthID...
function TestExecuteStreamWithAuthManager_ValidatesOpenAIResponsesStreamDataJSON (line 559) | func TestExecuteStreamWithAuthManager_ValidatesOpenAIResponsesStreamData...
FILE: sdk/api/handlers/header_filter.go
function FilterUpstreamHeaders (line 29) | func FilterUpstreamHeaders(src http.Header) http.Header {
function connectionScopedHeaders (line 51) | func connectionScopedHeaders(src http.Header) map[string]struct{} {
function WriteUpstreamHeaders (line 67) | func WriteUpstreamHeaders(dst http.Header, src http.Header) {
FILE: sdk/api/handlers/header_filter_test.go
function TestFilterUpstreamHeaders_RemovesConnectionScopedHeaders (line 8) | func TestFilterUpstreamHeaders_RemovesConnectionScopedHeaders(t *testing...
function TestFilterUpstreamHeaders_ReturnsNilWhenAllHeadersBlocked (line 45) | func TestFilterUpstreamHeaders_ReturnsNilWhenAllHeadersBlocked(t *testin...
FILE: sdk/api/handlers/openai/openai_handlers.go
type OpenAIAPIHandler (line 28) | type OpenAIAPIHandler struct
method HandlerType (line 47) | func (h *OpenAIAPIHandler) HandlerType() string {
method Models (line 52) | func (h *OpenAIAPIHandler) Models() []map[string]any {
method OpenAIModels (line 61) | func (h *OpenAIAPIHandler) OpenAIModels(c *gin.Context) {
method ChatCompletions (line 98) | func (h *OpenAIAPIHandler) ChatCompletions(c *gin.Context) {
method Completions (line 153) | func (h *OpenAIAPIHandler) Completions(c *gin.Context) {
method handleNonStreamingResponse (line 429) | func (h *OpenAIAPIHandler) handleNonStreamingResponse(c *gin.Context, ...
method handleStreamingResponse (line 452) | func (h *OpenAIAPIHandler) handleStreamingResponse(c *gin.Context, raw...
method handleCompletionsNonStreamingResponse (line 528) | func (h *OpenAIAPIHandler) handleCompletionsNonStreamingResponse(c *gi...
method handleCompletionsStreamingResponse (line 557) | func (h *OpenAIAPIHandler) handleCompletionsStreamingResponse(c *gin.C...
method handleStreamResult (line 660) | func (h *OpenAIAPIHandler) handleStreamResult(c *gin.Context, flusher ...
function NewOpenAIAPIHandler (line 40) | func NewOpenAIAPIHandler(apiHandlers *handlers.BaseAPIHandler) *OpenAIAP...
function shouldTreatAsResponsesFormat (line 133) | func shouldTreatAsResponsesFormat(rawJSON []byte) bool {
function convertCompletionsRequestToChatCompletions (line 184) | func convertCompletionsRequestToChatCompletions(rawJSON []byte) []byte {
function convertChatCompletionsResponseToCompletions (line 256) | func convertChatCompletionsResponseToCompletions(rawJSON []byte) []byte {
function convertChatCompletionsStreamChunkToCompletions (line 330) | func convertChatCompletionsStreamChunkToCompletions(chunkData []byte) []...
FILE: sdk/api/handlers/openai/openai_responses_compact_test.go
type compactCaptureExecutor (line 19) | type compactCaptureExecutor struct
method Identifier (line 25) | func (e *compactCaptureExecutor) Identifier() string { return "test-pr...
method Execute (line 27) | func (e *compactCaptureExecutor) Execute(ctx context.Context, auth *co...
method ExecuteStream (line 34) | func (e *compactCaptureExecutor) ExecuteStream(context.Context, *corea...
method Refresh (line 38) | func (e *compactCaptureExecutor) Refresh(ctx context.Context, auth *co...
method CountTokens (line 42) | func (e *compactCaptureExecutor) CountTokens(context.Context, *coreaut...
method HttpRequest (line 46) | func (e *compactCaptureExecutor) HttpRequest(context.Context, *coreaut...
function TestOpenAIResponsesCompactRejectsStream (line 50) | func TestOpenAIResponsesCompactRejectsStream(t *testing.T) {
function TestOpenAIResponsesCompactExecute (line 83) | func TestOpenAIResponsesCompactExecute(t *testing.T) {
FILE: sdk/api/handlers/openai/openai_responses_handlers.go
type OpenAIResponsesAPIHandler (line 26) | type OpenAIResponsesAPIHandler struct
method HandlerType (line 45) | func (h *OpenAIResponsesAPIHandler) HandlerType() string {
method Models (line 50) | func (h *OpenAIResponsesAPIHandler) Models() []map[string]any {
method OpenAIResponsesModels (line 59) | func (h *OpenAIResponsesAPIHandler) OpenAIResponsesModels(c *gin.Conte...
method Responses (line 72) | func (h *OpenAIResponsesAPIHandler) Responses(c *gin.Context) {
method Compact (line 95) | func (h *OpenAIResponsesAPIHandler) Compact(c *gin.Context) {
method handleNonStreamingResponse (line 146) | func (h *OpenAIResponsesAPIHandler) handleNonStreamingResponse(c *gin....
method handleStreamingResponse (line 172) | func (h *OpenAIResponsesAPIHandler) handleStreamingResponse(c *gin.Con...
method forwardResponsesStream (line 247) | func (h *OpenAIResponsesAPIHandler) forwardResponsesStream(c *gin.Cont...
function NewOpenAIResponsesAPIHandler (line 38) | func NewOpenAIResponsesAPIHandler(apiHandlers *handlers.BaseAPIHandler) ...
FILE: sdk/api/handlers/openai/openai_responses_handlers_stream_error_test.go
function TestForwardResponsesStreamTerminalErrorUsesResponsesErrorChunk (line 16) | func TestForwardResponsesStreamTerminalErrorUsesResponsesErrorChunk(t *t...
FILE: sdk/api/handlers/openai/openai_responses_websocket.go
constant wsRequestTypeCreate (line 29) | wsRequestTypeCreate = "response.create"
constant wsRequestTypeAppend (line 30) | wsRequestTypeAppend = "response.append"
constant wsEventTypeError (line 31) | wsEventTypeError = "error"
constant wsEventTypeCompleted (line 32) | wsEventTypeCompleted = "response.completed"
constant wsDoneMarker (line 33) | wsDoneMarker = "[DONE]"
constant wsTurnStateHeader (line 34) | wsTurnStateHeader = "x-codex-turn-state"
constant wsRequestBodyKey (line 35) | wsRequestBodyKey = "REQUEST_BODY_OVERRIDE"
constant wsPayloadLogMaxSize (line 36) | wsPayloadLogMaxSize = 2048
constant wsBodyLogMaxSize (line 37) | wsBodyLogMaxSize = 64 * 1024
constant wsBodyLogTruncated (line 38) | wsBodyLogTruncated = "\n[websocket log truncated]\n"
method ResponsesWebsocket (line 52) | func (h *OpenAIResponsesAPIHandler) ResponsesWebsocket(c *gin.Context) {
function websocketUpgradeHeaders (line 206) | func websocketUpgradeHeaders(req *http.Request) http.Header {
function normalizeResponsesWebsocketRequest (line 220) | func normalizeResponsesWebsocketRequest(rawJSON []byte, lastRequest []by...
function normalizeResponsesWebsocketRequestWithMode (line 224) | func normalizeResponsesWebsocketRequestWithMode(rawJSON []byte, lastRequ...
function normalizeResponseCreateRequest (line 244) | func normalizeResponseCreateRequest(rawJSON []byte) ([]byte, []byte, *in...
function normalizeResponseSubsequentRequest (line 264) | func normalizeResponseSubsequentRequest(rawJSON []byte, lastRequest []by...
function websocketUpstreamSupportsIncrementalInput (line 351) | func websocketUpstreamSupportsIncrementalInput(attributes map[string]str...
method websocketUpstreamSupportsIncrementalInputForModel (line 380) | func (h *OpenAIResponsesAPIHandler) websocketUpstreamSupportsIncremental...
function responsesWebsocketAuthAvailableForModel (line 449) | func responsesWebsocketAuthAvailableForModel(auth *coreauth.Auth, modelN...
function shouldHandleResponsesWebsocketPrewarmLocally (line 480) | func shouldHandleResponsesWebsocketPrewarmLocally(rawJSON []byte, lastRe...
function writeResponsesWebsocketSyntheticPrewarm (line 491) | func writeResponsesWebsocketSyntheticPrewarm(
function syntheticResponsesWebsocketPrewarmPayloads (line 525) | func syntheticResponsesWebsocketPrewarmPayloads(requestJSON []byte) ([][...
function mergeJSONArrayRaw (line 566) | func mergeJSONArrayRaw(existingRaw, appendRaw string) (string, error) {
function normalizeJSONArrayRaw (line 593) | func normalizeJSONArrayRaw(raw []byte) string {
method forwardResponsesWebsocket (line 605) | func (h *OpenAIResponsesAPIHandler) forwardResponsesWebsocket(
function responseCompletedOutputFromPayload (line 722) | func responseCompletedOutputFromPayload(payload []byte) []byte {
function websocketJSONPayloadsFromChunk (line 730) | func websocketJSONPayloadsFromChunk(chunk []byte) [][]byte {
function writeResponsesWebsocketError (line 763) | func writeResponsesWebsocketError(conn *websocket.Conn, errMsg *interfac...
function appendWebsocketEvent (line 836) | func appendWebsocketEvent(builder *strings.Builder, eventType string, pa...
function appendWebsocketLogString (line 868) | func appendWebsocketLogString(builder *strings.Builder, value string) bo...
function appendWebsocketLogBytes (line 884) | func appendWebsocketLogBytes(builder *strings.Builder, value []byte, res...
function websocketPayloadEventType (line 907) | func websocketPayloadEventType(payload []byte) string {
function websocketPayloadPreview (line 915) | func websocketPayloadPreview(payload []byte) string {
function setWebsocketRequestBody (line 932) | func setWebsocketRequestBody(c *gin.Context, body string) {
function markAPIResponseTimestamp (line 943) | func markAPIResponseTimestamp(c *gin.Context) {
FILE: sdk/api/handlers/openai/openai_responses_websocket_test.go
type websocketCaptureExecutor (line 25) | type websocketCaptureExecutor struct
method Identifier (line 102) | func (e *websocketCaptureExecutor) Identifier() string { return "test-...
method Execute (line 104) | func (e *websocketCaptureExecutor) Execute(context.Context, *coreauth....
method ExecuteStream (line 108) | func (e *websocketCaptureExecutor) ExecuteStream(_ context.Context, _ ...
method Refresh (line 117) | func (e *websocketCaptureExecutor) Refresh(_ context.Context, auth *co...
method CountTokens (line 121) | func (e *websocketCaptureExecutor) CountTokens(context.Context, *corea...
method HttpRequest (line 125) | func (e *websocketCaptureExecutor) HttpRequest(context.Context, *corea...
type orderedWebsocketSelector (line 30) | type orderedWebsocketSelector struct
method Pick (line 36) | func (s *orderedWebsocketSelector) Pick(_ context.Context, _ string, _...
type websocketAuthCaptureExecutor (line 60) | type websocketAuthCaptureExecutor struct
method Identifier (line 65) | func (e *websocketAuthCaptureExecutor) Identifier() string { return "t...
method Execute (line 67) | func (e *websocketAuthCaptureExecutor) Execute(context.Context, *corea...
method ExecuteStream (line 71) | func (e *websocketAuthCaptureExecutor) ExecuteStream(_ context.Context...
method Refresh (line 84) | func (e *websocketAuthCaptureExecutor) Refresh(_ context.Context, auth...
method CountTokens (line 88) | func (e *websocketAuthCaptureExecutor) CountTokens(context.Context, *c...
method HttpRequest (line 92) | func (e *websocketAuthCaptureExecutor) HttpRequest(context.Context, *c...
method AuthIDs (line 96) | func (e *websocketAuthCaptureExecutor) AuthIDs() []string {
function TestNormalizeResponsesWebsocketRequestCreate (line 129) | func TestNormalizeResponsesWebsocketRequestCreate(t *testing.T) {
function TestNormalizeResponsesWebsocketRequestCreateWithHistory (line 150) | func TestNormalizeResponsesWebsocketRequestCreateWithHistory(t *testing....
function TestNormalizeResponsesWebsocketRequestWithPreviousResponseIDIncremental (line 184) | func TestNormalizeResponsesWebsocketRequestWithPreviousResponseIDIncreme...
function TestNormalizeResponsesWebsocketRequestWithPreviousResponseIDMergedWhenIncrementalDisabled (line 220) | func TestNormalizeResponsesWebsocketRequestWithPreviousResponseIDMergedW...
function TestNormalizeResponsesWebsocketRequestAppend (line 250) | func TestNormalizeResponsesWebsocketRequestAppend(t *testing.T) {
function TestNormalizeResponsesWebsocketRequestAppendWithoutCreate (line 278) | func TestNormalizeResponsesWebsocketRequestAppendWithoutCreate(t *testin...
function TestWebsocketJSONPayloadsFromChunk (line 290) | func TestWebsocketJSONPayloadsFromChunk(t *testing.T) {
function TestWebsocketJSONPayloadsFromPlainJSONChunk (line 302) | func TestWebsocketJSONPayloadsFromPlainJSONChunk(t *testing.T) {
function TestResponseCompletedOutputFromPayload (line 314) | func TestResponseCompletedOutputFromPayload(t *testing.T) {
function TestAppendWebsocketEvent (line 327) | func TestAppendWebsocketEvent(t *testing.T) {
function TestAppendWebsocketEventTruncatesAtLimit (line 342) | func TestAppendWebsocketEventTruncatesAtLimit(t *testing.T) {
function TestAppendWebsocketEventNoGrowthAfterLimit (line 357) | func TestAppendWebsocketEventNoGrowthAfterLimit(t *testing.T) {
function TestSetWebsocketRequestBody (line 369) | func TestSetWebsocketRequestBody(t *testing.T) {
function TestForwardResponsesWebsocketPreservesCompletedEvent (line 393) | func TestForwardResponsesWebsocketPreservesCompletedEvent(t *testing.T) {
function TestWebsocketUpstreamSupportsIncrementalInputForModel (line 469) | func TestWebsocketUpstreamSupportsIncrementalInputForModel(t *testing.T) {
function TestResponsesWebsocketPrewarmHandledLocallyForSSEUpstream (line 492) | func TestResponsesWebsocketPrewarmHandledLocallyForSSEUpstream(t *testin...
function TestResponsesWebsocketPinsOnlyWebsocketCapableAuth (line 596) | func TestResponsesWebsocketPinsOnlyWebsocketCapableAuth(t *testing.T) {
FILE: sdk/api/handlers/openai_responses_stream_error.go
type openAIResponsesStreamErrorChunk (line 10) | type openAIResponsesStreamErrorChunk struct
function openAIResponsesStreamErrorCode (line 17) | func openAIResponsesStreamErrorCode(status int) string {
function BuildOpenAIResponsesStreamErrorChunk (line 45) | func BuildOpenAIResponsesStreamErrorChunk(status int, errText string, se...
FILE: sdk/api/handlers/openai_responses_stream_error_test.go
function TestBuildOpenAIResponsesStreamErrorChunk (line 9) | func TestBuildOpenAIResponsesStreamErrorChunk(t *testing.T) {
function TestBuildOpenAIResponsesStreamErrorChunkExtractsHTTPErrorBody (line 29) | func TestBuildOpenAIResponsesStreamErrorChunkExtractsHTTPErrorBody(t *te...
FILE: sdk/api/handlers/stream_forwarder.go
type StreamForwardOptions (line 11) | type StreamForwardOptions struct
method ForwardStream (line 32) | func (h *BaseAPIHandler) ForwardStream(c *gin.Context, flusher http.Flus...
FILE: sdk/api/management.go
type ManagementTokenRequester (line 15) | type ManagementTokenRequester interface
type managementTokenRequester (line 28) | type managementTokenRequester struct
method RequestAnthropicToken (line 39) | func (m *managementTokenRequester) RequestAnthropicToken(c *gin.Contex...
method RequestGeminiCLIToken (line 43) | func (m *managementTokenRequester) RequestGeminiCLIToken(c *gin.Contex...
method RequestCodexToken (line 47) | func (m *managementTokenRequester) RequestCodexToken(c *gin.Context) {
method RequestAntigravityToken (line 51) | func (m *managementTokenRequester) RequestAntigravityToken(c *gin.Cont...
method RequestQwenToken (line 55) | func (m *managementTokenRequester) RequestQwenToken(c *gin.Context) {
method RequestKimiToken (line 59) | func (m *managementTokenRequester) RequestKimiToken(c *gin.Context) {
method RequestIFlowToken (line 63) | func (m *managementTokenRequester) RequestIFlowToken(c *gin.Context) {
method RequestIFlowCookieToken (line 67) | func (m *managementTokenRequester) RequestIFlowCookieToken(c *gin.Cont...
method GetAuthStatus (line 71) | func (m *managementTokenRequester) GetAuthStatus(c *gin.Context) {
method PostOAuthCallback (line 75) | func (m *managementTokenRequester) PostOAuthCallback(c *gin.Context) {
function NewManagementTokenRequester (line 33) | func NewManagementTokenRequester(cfg *config.Config, manager *coreauth.M...
FILE: sdk/api/options.go
function WithMiddleware (line 21) | func WithMiddleware(mw ...gin.HandlerFunc) ServerOption { return interna...
function WithEngineConfigurator (line 24) | func WithEngineConfigurator(fn func(*gin.Engine)) ServerOption {
function WithRouterConfigurator (line 29) | func WithRouterConfigurator(fn func(*gin.Engine, *handlers.BaseAPIHandle...
function WithLocalManagementPassword (line 34) | func WithLocalManagementPassword(password string) ServerOption {
function WithKeepAliveEndpoint (line 39) | func WithKeepAliveEndpoint(timeout time.Duration, onTimeout func()) Serv...
function WithRequestLoggerFactory (line 44) | func WithRequestLoggerFactory(factory func(*config.Config, string) loggi...
FILE: sdk/auth/antigravity.go
type AntigravityAuthenticator (line 21) | type AntigravityAuthenticator struct
method Provider (line 27) | func (AntigravityAuthenticator) Provider() string { return "antigravit...
method RefreshLead (line 30) | func (AntigravityAuthenticator) RefreshLead() *time.Duration {
method Login (line 35) | func (AntigravityAuthenticator) Login(ctx context.Context, cfg *config...
function NewAntigravityAuthenticator (line 24) | func NewAntigravityAuthenticator() Authenticator { return &AntigravityAu...
type callbackResult (line 216) | type callbackResult struct
function startAntigravityCallbackServer (line 222) | func startAntigravityCallbackServer(port int) (*http.Server, int, <-chan...
function FetchAntigravityProjectID (line 261) | func FetchAntigravityProjectID(ctx context.Context, accessToken string, ...
FILE: sdk/auth/claude.go
type ClaudeAuthenticator (line 21) | type ClaudeAuthenticator struct
method Provider (line 30) | func (a *ClaudeAuthenticator) Provider() string {
method RefreshLead (line 34) | func (a *ClaudeAuthenticator) RefreshLead() *time.Duration {
method Login (line 38) | func (a *ClaudeAuthenticator) Login(ctx context.Context, cfg *config.C...
function NewClaudeAuthenticator (line 26) | func NewClaudeAuthenticator() *ClaudeAuthenticator {
FILE: sdk/auth/codex.go
type CodexAuthenticator (line 21) | type CodexAuthenticator struct
method Provider (line 30) | func (a *CodexAuthenticator) Provider() string {
method RefreshLead (line 34) | func (a *CodexAuthenticator) RefreshLead() *time.Duration {
method Login (line 38) | func (a *CodexAuthenticator) Login(ctx context.Context, cfg *config.Co...
function NewCodexAuthenticator (line 26) | func NewCodexAuthenticator() *CodexAuthenticator {
FILE: sdk/auth/codex_device.go
constant codexLoginModeMetadataKey (line 25) | codexLoginModeMetadataKey = "codex_login_mode"
constant codexLoginModeDevice (line 26) | codexLoginModeDevice = "device"
constant codexDeviceUserCodeURL (line 27) | codexDeviceUserCodeURL = "https://auth.openai.com/api/acc...
constant codexDeviceTokenURL (line 28) | codexDeviceTokenURL = "https://auth.openai.com/api/acc...
constant codexDeviceVerificationURL (line 29) | codexDeviceVerificationURL = "https://auth.openai.com/codex/d...
constant codexDeviceTokenExchangeRedirectURI (line 30) | codexDeviceTokenExchangeRedirectURI = "https://auth.openai.com/devicea...
constant codexDeviceTimeout (line 31) | codexDeviceTimeout = 15 * time.Minute
constant codexDeviceDefaultPollIntervalSeconds (line 32) | codexDeviceDefaultPollIntervalSeconds = 5
type codexDeviceUserCodeRequest (line 35) | type codexDeviceUserCodeRequest struct
type codexDeviceUserCodeResponse (line 39) | type codexDeviceUserCodeResponse struct
type codexDeviceTokenRequest (line 46) | type codexDeviceTokenRequest struct
type codexDeviceTokenResponse (line 51) | type codexDeviceTokenResponse struct
function shouldUseCodexDeviceFlow (line 57) | func shouldUseCodexDeviceFlow(opts *LoginOptions) bool {
method loginWithDeviceFlow (line 64) | func (a *CodexAuthenticator) loginWithDeviceFlow(ctx context.Context, cf...
function requestCodexDeviceUserCode (line 128) | func requestCodexDeviceUserCode(ctx context.Context, client *http.Client...
function pollCodexDeviceToken (line 171) | func pollCodexDeviceToken(ctx context.Context, client *http.Client, devi...
function parseCodexDevicePollInterval (line 229) | func parseCodexDevicePollInterval(raw json.RawMessage) time.Duration {
function codexDeviceIsSuccessStatus (line 250) | func codexDeviceIsSuccessStatus(code int) bool {
method buildAuthRecord (line 254) | func (a *CodexAuthenticator) buildAuthRecord(authSvc *codex.CodexAuth, a...
FILE: sdk/auth/errors.go
type ProjectSelectionError (line 10) | type ProjectSelectionError struct
method Error (line 15) | func (e *ProjectSelectionError) Error() string {
method ProjectsDisplay (line 23) | func (e *ProjectSelectionError) ProjectsDisplay() []interfaces.GCPProj...
type EmailRequiredError (line 31) | type EmailRequiredError struct
method Error (line 35) | func (e *EmailRequiredError) Error() string {
FILE: sdk/auth/filestore.go
type FileTokenStore (line 22) | type FileTokenStore struct
method SetBaseDir (line 35) | func (s *FileTokenStore) SetBaseDir(dir string) {
method Save (line 42) | func (s *FileTokenStore) Save(ctx context.Context, auth *cliproxyauth....
method List (line 126) | func (s *FileTokenStore) List(ctx context.Context) ([]*cliproxyauth.Au...
method Delete (line 158) | func (s *FileTokenStore) Delete(ctx context.Context, id string) error {
method resolveDeletePath (line 173) | func (s *FileTokenStore) resolveDeletePath(id string) (string, error) {
method readAuthFile (line 184) | func (s *FileTokenStore) readAuthFile(path, baseDir string) (*cliproxy...
method idFor (line 260) | func (s *FileTokenStore) idFor(path, baseDir string) string {
method resolveAuthPath (line 274) | func (s *FileTokenStore) resolveAuthPath(auth *cliproxyauth.Auth) (str...
method labelFor (line 305) | func (s *FileTokenStore) labelFor(metadata map[string]any) string {
method baseDirSnapshot (line 321) | func (s *FileTokenStore) baseDirSnapshot() string {
function NewFileTokenStore (line 30) | func NewFileTokenStore() *FileTokenStore {
function extractAccessToken (line 327) | func extractAccessToken(metadata map[string]any) string {
function refreshGeminiAccessToken (line 343) | func refreshGeminiAccessToken(tokenMap map[string]any, httpClient *http....
function jsonEqual (line 389) | func jsonEqual(a, b []byte) bool {
function deepEqualJSON (line 401) | func deepEqualJSON(a, b any) bool {
FILE: sdk/auth/filestore_test.go
function TestExtractAccessToken (line 5) | func TestExtractAccessToken(t *testing.T) {
FILE: sdk/auth/gemini.go
type GeminiAuthenticator (line 15) | type GeminiAuthenticator struct
method Provider (line 22) | func (a *GeminiAuthenticator) Provider() string {
method RefreshLead (line 26) | func (a *GeminiAuthenticator) RefreshLead() *time.Duration {
method Login (line 30) | func (a *GeminiAuthenticator) Login(ctx context.Context, cfg *config.C...
function NewGeminiAuthenticator (line 18) | func NewGeminiAuthenticator() *GeminiAuthenticator {
FILE: sdk/auth/iflow.go
type IFlowAuthenticator (line 19) | type IFlowAuthenticator struct
method Provider (line 25) | func (a *IFlowAuthenticator) Provider() string { return "iflow" }
method RefreshLead (line 28) | func (a *IFlowAuthenticator) RefreshLead() *time.Duration {
method Login (line 33) | func (a *IFlowAuthenticator) Login(ctx context.Context, cfg *config.Co...
function NewIFlowAuthenticator (line 22) | func NewIFlowAuthenticator() *IFlowAuthenticator { return &IFlowAuthenti...
FILE: sdk/auth/interfaces.go
type LoginOptions (line 16) | type LoginOptions struct
type Authenticator (line 25) | type Authenticator interface
FILE: sdk/auth/kimi.go
type KimiAuthenticator (line 20) | type KimiAuthenticator struct
method Provider (line 28) | func (KimiAuthenticator) Provider() string {
method RefreshLead (line 34) | func (KimiAuthenticator) RefreshLead() *time.Duration {
method Login (line 39) | func (a KimiAuthenticator) Login(ctx context.Context, cfg *config.Conf...
function NewKimiAuthenticator (line 23) | func NewKimiAuthenticator() Authenticator {
FILE: sdk/auth/manager.go
type Manager (line 12) | type Manager struct
method Register (line 31) | func (m *Manager) Register(a Authenticator) {
method SetStore (line 42) | func (m *Manager) SetStore(store coreauth.Store) {
method Login (line 47) | func (m *Manager) Login(ctx context.Context, provider string, cfg *con...
function NewManager (line 19) | func NewManager(store coreauth.Store, authenticators ...Authenticator) *...
FILE: sdk/auth/qwen.go
type QwenAuthenticator (line 18) | type QwenAuthenticator struct
method Provider (line 25) | func (a *QwenAuthenticator) Provider() string {
method RefreshLead (line 29) | func (a *QwenAuthenticator) RefreshLead() *time.Duration {
method Login (line 33) | func (a *QwenAuthenticator) Login(ctx context.Context, cfg *config.Con...
function NewQwenAuthenticator (line 21) | func NewQwenAuthenticator() *QwenAuthenticator {
FILE: sdk/auth/refresh_registry.go
function init (line 9) | func init() {
function registerRefreshLead (line 20) | func registerRefreshLead(provider string, factory func() Authenticator) {
FILE: sdk/auth/store_registry.go
function RegisterTokenStore (line 15) | func RegisterTokenStore(store coreauth.Store) {
function GetTokenStore (line 22) | func GetTokenStore() coreauth.Store {
FILE: sdk/cliproxy/auth/api_key_model_alias_test.go
function TestLookupAPIKeyUpstreamModel (line 10) | func TestLookupAPIKeyUpstreamModel(t *testing.T) {
function TestAPIKeyModelAlias_ConfigHotReload (line 69) | func TestAPIKeyModelAlias_ConfigHotReload(t *testing.T) {
function TestAPIKeyModelAlias_MultipleProviders (line 106) | func TestAPIKeyModelAlias_MultipleProviders(t *testing.T) {
function TestApplyAPIKeyModelAlias (line 136) | func TestApplyAPIKeyModelAlias(t *testing.T) {
FILE: sdk/cliproxy/auth/conductor.go
type ProviderExecutor (line 28) | type ProviderExecutor interface
type ExecutionSessionCloser (line 46) | type ExecutionSessionCloser interface
constant CloseAllExecutionSessionsID (line 53) | CloseAllExecutionSessionsID = "__all_execution_sessions__"
type RefreshEvaluator (line 57) | type RefreshEvaluator interface
constant refreshCheckInterval (line 62) | refreshCheckInterval = 5 * time.Second
constant refreshMaxConcurrency (line 63) | refreshMaxConcurrency = 16
constant refreshPendingBackoff (line 64) | refreshPendingBackoff = time.Minute
constant refreshFailureBackoff (line 65) | refreshFailureBackoff = 5 * time.Minute
constant quotaBackoffBase (line 66) | quotaBackoffBase = time.Second
constant quotaBackoffMax (line 67) | quotaBackoffMax = 30 * time.Minute
function SetQuotaCooldownDisabled (line 73) | func SetQuotaCooldownDisabled(disable bool) {
function quotaCooldownDisabledForAuth (line 77) | func quotaCooldownDisabledForAuth(auth *Auth) bool {
type Result (line 87) | type Result struct
type Selector (line 103) | type Selector interface
type Hook (line 108) | type Hook interface
type NoopHook (line 118) | type NoopHook struct
method OnAuthRegistered (line 121) | func (NoopHook) OnAuthRegistered(context.Context, *Auth) {}
method OnAuthUpdated (line 124) | func (NoopHook) OnAuthUpdated(context.Context, *Auth) {}
method OnResult (line 127) | func (NoopHook) OnResult(context.Context, Result) {}
type Manager (line 130) | type Manager struct
method syncSchedulerFromSnapshot (line 202) | func (m *Manager) syncSchedulerFromSnapshot(auths []*Auth) {
method syncScheduler (line 209) | func (m *Manager) syncScheduler() {
method RefreshSchedulerEntry (line 221) | func (m *Manager) RefreshSchedulerEntry(authID string) {
method SetSelector (line 236) | func (m *Manager) SetSelector(selector Selector) {
method SetStore (line 253) | func (m *Manager) SetStore(store Store) {
method SetRoundTripperProvider (line 260) | func (m *Manager) SetRoundTripperProvider(p RoundTripperProvider) {
method SetConfig (line 268) | func (m *Manager) SetConfig(cfg *internalconfig.Config) {
method lookupAPIKeyUpstreamModel (line 279) | func (m *Manager) lookupAPIKeyUpstreamModel(authID, requestedModel str...
method nextModelPoolOffset (line 354) | func (m *Manager) nextModelPoolOffset(key string, size int) int {
method resolveOpenAICompatUpstreamModelPool (line 394) | func (m *Manager) resolveOpenAICompatUpstreamModelPool(auth *Auth, req...
method executionModelCandidates (line 423) | func (m *Manager) executionModelCandidates(auth *Auth, routeModel stri...
method prepareExecutionModels (line 427) | func (m *Manager) prepareExecutionModels(auth *Auth, routeModel string...
method wrapStreamResult (line 486) | func (m *Manager) wrapStreamResult(ctx context.Context, auth *Auth, pr...
method executeStreamWithModelPool (line 535) | func (m *Manager) executeStreamWithModelPool(ctx context.Context, exec...
method rebuildAPIKeyModelAliasFromRuntimeConfig (line 626) | func (m *Manager) rebuildAPIKeyModelAliasFromRuntimeConfig() {
method rebuildAPIKeyModelAliasLocked (line 639) | func (m *Manager) rebuildAPIKeyModelAliasLocked(cfg *internalconfig.Co...
method SetRetryConfig (line 749) | func (m *Manager) SetRetryConfig(retry int, maxRetryInterval time.Dura...
method RegisterExecutor (line 768) | func (m *Manager) RegisterExecutor(executor ProviderExecutor) {
method UnregisterExecutor (line 792) | func (m *Manager) UnregisterExecutor(provider string) {
method Register (line 803) | func (m *Manager) Register(ctx context.Context, auth *Auth) (*Auth, er...
method Update (line 825) | func (m *Manager) Update(ctx context.Context, auth *Auth) (*Auth, erro...
method Load (line 853) | func (m *Manager) Load(ctx context.Context) error {
method Execute (line 884) | func (m *Manager) Execute(ctx context.Context, providers []string, req...
method ExecuteCount (line 915) | func (m *Manager) ExecuteCount(ctx context.Context, providers []string...
method ExecuteStream (line 946) | func (m *Manager) ExecuteStream(ctx context.Context, providers []strin...
method executeMixedOnce (line 975) | func (m *Manager) executeMixedOnce(ctx context.Context, providers []st...
method executeCountMixedOnce (line 1047) | func (m *Manager) executeCountMixedOnce(ctx context.Context, providers...
method executeStreamMixedOnce (line 1119) | func (m *Manager) executeStreamMixedOnce(ctx context.Context, provider...
method applyAPIKeyModelAlias (line 1253) | func (m *Manager) applyAPIKeyModelAlias(auth *Auth, requestedModel str...
method normalizeProviders (line 1465) | func (m *Manager) normalizeProviders(providers []string) []string {
method retrySettings (line 1485) | func (m *Manager) retrySettings() (int, int, time.Duration) {
method closestCooldownWait (line 1492) | func (m *Manager) closestCooldownWait(providers []string, model string...
method shouldRetryAfterError (line 1549) | func (m *Manager) shouldRetryAfterError(err error, attempt int, provid...
method MarkResult (line 1584) | func (m *Manager) MarkResult(ctx context.Context, result Result) {
method List (line 1978) | func (m *Manager) List() []*Auth {
method GetByID (line 1990) | func (m *Manager) GetByID(id string) (*Auth, bool) {
method Executor (line 2004) | func (m *Manager) Executor(provider string) (ProviderExecutor, bool) {
method CloseExecutionSession (line 2030) | func (m *Manager) CloseExecutionSession(sessionID string) {
method useSchedulerFastPath (line 2050) | func (m *Manager) useSchedulerFastPath() bool {
method pickNextLegacy (line 2072) | func (m *Manager) pickNextLegacy(ctx context.Context, provider, model ...
method pickNext (line 2132) | func (m *Manager) pickNext(ctx context.Context, provider, model string...
method pickNextMixedLegacy (line 2163) | func (m *Manager) pickNextMixedLegacy(ctx context.Context, providers [...
method pickNextMixed (line 2246) | func (m *Manager) pickNextMixed(ctx context.Context, providers []strin...
method persist (line 2298) | func (m *Manager) persist(ctx context.Context, auth *Auth) error {
method StartAutoRefresh (line 2321) | func (m *Manager) StartAutoRefresh(parent context.Context, interval ti...
method StopAutoRefresh (line 2347) | func (m *Manager) StopAutoRefresh() {
method checkRefreshes (line 2354) | func (m *Manager) checkRefreshes(ctx context.Context) {
method refreshAuthWithLimit (line 2377) | func (m *Manager) refreshAuthWithLimit(ctx context.Context, id string) {
method snapshotAuths (line 2391) | func (m *Manager) snapshotAuths() []*Auth {
method shouldRefresh (line 2401) | func (m *Manager) shouldRefresh(a *Auth, now time.Time) bool {
method markRefreshPending (line 2606) | func (m *Manager) markRefreshPending(id string, now time.Time) bool {
method refreshAuth (line 2621) | func (m *Manager) refreshAuth(ctx context.Context, id string) {
method executorFor (line 2671) | func (m *Manager) executorFor(provider string) ProviderExecutor {
method roundTripperFor (line 2681) | func (m *Manager) roundTripperFor(auth *Auth) http.RoundTripper {
method InjectCredentials (line 2786) | func (m *Manager) InjectCredentials(req *http.Request, authID string) ...
method PrepareHttpRequest (line 2807) | func (m *Manager) PrepareHttpRequest(ctx context.Context, auth *Auth, ...
method NewHttpRequest (line 2836) | func (m *Manager) NewHttpRequest(ctx context.Context, auth *Auth, meth...
method HttpRequest (line 2862) | func (m *Manager) HttpRequest(ctx context.Context, auth *Auth, req *ht...
function NewManager (line 169) | func NewManager(store Store, selector Selector, hook Hook) *Manager {
function isBuiltInSelector (line 193) | func isBuiltInSelector(selector Selector) bool {
function isAPIKeyAuth (line 310) | func isAPIKeyAuth(auth *Auth) bool {
function isOpenAICompatAPIKeyAuth (line 318) | func isOpenAICompatAPIKeyAuth(auth *Auth) bool {
function openAICompatProviderKey (line 331) | func openAICompatProviderKey(auth *Auth) string {
function openAICompatModelPoolKey (line 346) | func openAICompatModelPoolKey(auth *Auth, requestedModel string) string {
function rotateStrings (line 378) | func rotateStrings(values []string, offset int) []string {
function preserveRequestedModelSuffix (line 419) | func preserveRequestedModelSuffix(requestedModel, resolved string) string {
function discardStreamChunks (line 444) | func discardStreamChunks(ch <-chan cliproxyexecutor.StreamChunk) {
function readStreamBootstrap (line 454) | func readStreamBootstrap(ctx context.Context, ch <-chan cliproxyexecutor...
function compileAPIKeyModelAliasForModels (line 702) | func compileAPIKeyModelAliasForModels[T interface {
function ensureRequestedModelMetadata (line 1167) | func ensureRequestedModelMetadata(opts cliproxyexecutor.Options, request...
function hasRequestedModelMetadata (line 1188) | func hasRequestedModelMetadata(meta map[string]any) bool {
function pinnedAuthIDFromMetadata (line 1206) | func pinnedAuthIDFromMetadata(meta map[string]any) string {
function publishSelectedAuthMetadata (line 1224) | func publishSelectedAuthMetadata(meta map[string]any, authID string) {
function rewriteModelForAuth (line 1238) | func rewriteModelForAuth(model string, auth *Auth) string {
type APIKeyConfigEntry (line 1303) | type APIKeyConfigEntry interface
function resolveAPIKeyConfig (line 1308) | func resolveAPIKeyConfig[T APIKeyConfigEntry](entries []T, auth *Auth) *T {
function resolveGeminiAPIKeyConfig (line 1347) | func resolveGeminiAPIKeyConfig(cfg *internalconfig.Config, auth *Auth) *...
function resolveClaudeAPIKeyConfig (line 1354) | func resolveClaudeAPIKeyConfig(cfg *internalconfig.Config, auth *Auth) *...
function resolveCodexAPIKeyConfig (line 1361) | func resolveCodexAPIKeyConfig(cfg *internalconfig.Config, auth *Auth) *i...
function resolveVertexAPIKeyConfig (line 1368) | func resolveVertexAPIKeyConfig(cfg *internalconfig.Config, auth *Auth) *...
function resolveUpstreamModelForGeminiAPIKey (line 1375) | func resolveUpstreamModelForGeminiAPIKey(cfg *internalconfig.Config, aut...
function resolveUpstreamModelForClaudeAPIKey (line 1383) | func resolveUpstreamModelForClaudeAPIKey(cfg *internalconfig.Config, aut...
function resolveUpstreamModelForCodexAPIKey (line 1391) | func resolveUpstreamModelForCodexAPIKey(cfg *internalconfig.Config, auth...
function resolveUpstreamModelForVertexAPIKey (line 1399) | func resolveUpstreamModelForVertexAPIKey(cfg *internalconfig.Config, aut...
function resolveUpstreamModelForOpenAICompatAPIKey (line 1407) | func resolveUpstreamModelForOpenAICompatAPIKey(cfg *internalconfig.Confi...
type apiKeyModelAliasTable (line 1424) | type apiKeyModelAliasTable
function resolveOpenAICompatConfig (line 1426) | func resolveOpenAICompatConfig(cfg *internalconfig.Config, providerKey, ...
function asModelAliasEntries (line 1451) | func asModelAliasEntries[T interface {
function waitForCooldown (line 1569) | func waitForCooldown(ctx context.Context, wait time.Duration) error {
function ensureModelState (line 1710) | func ensureModelState(auth *Auth, model string) *ModelState {
function resetModelState (line 1725) | func resetModelState(state *ModelState, now time.Time) {
function updateAggregatedAvailability (line 1738) | func updateAggregatedAvailability(auth *Auth, now time.Time) {
function hasModelError (line 1799) | func hasModelError(auth *Auth, now time.Time) bool {
function clearAuthStateOnSuccess (line 1819) | func clearAuthStateOnSuccess(auth *Auth, now time.Time) {
function cloneError (line 1835) | func cloneError(err *Error) *Error {
function statusCodeFromError (line 1847) | func statusCodeFromError(err error) int {
function retryAfterFromError (line 1861) | func retryAfterFromError(err error) *time.Duration {
function statusCodeFromResult (line 1879) | func statusCodeFromResult(err *Error) int {
function isRequestInvalidError (line 1890) | func isRequestInvalidError(err error) bool {
function applyAuthFailureState (line 1905) | func applyAuthFailureState(auth *Auth, resultErr *Error, retryAfter *tim...
function nextQuotaCooldown (line 1960) | func nextQuotaCooldown(prevLevel int, disableCooling bool) (time.Duratio...
function shouldRetrySchedulerPick (line 2057) | func shouldRetrySchedulerPick(err error) bool {
function authPreferredInterval (line 2456) | func authPreferredInterval(a *Auth) time.Duration {
function durationFromMetadata (line 2469) | func durationFromMetadata(meta map[string]any, keys ...string) time.Dura...
function durationFromAttributes (line 2483) | func durationFromAttributes(attrs map[string]string, keys ...string) tim...
function parseDurationValue (line 2497) | func parseDurationValue(val any) time.Duration {
function parseDurationString (line 2560) | func parseDurationString(raw string) time.Duration {
function authLastRefreshTimestamp (line 2574) | func authLastRefreshTimestamp(a *Auth) (time.Time, bool) {
function lookupMetadataTime (line 2595) | func lookupMetadataTime(meta map[string]any, keys ...string) (time.Time,...
type roundTripperContextKey (line 2678) | type roundTripperContextKey struct
type RoundTripperProvider (line 2692) | type RoundTripperProvider interface
type RequestPreparer (line 2698) | type RequestPreparer interface
function executorKeyFromAuth (line 2702) | func executorKeyFromAuth(auth *Auth) string {
function logEntryWithRequestID (line 2720) | func logEntryWithRequestID(ctx context.Context) *log.Entry {
function debugLogAuthSelection (line 2730) | func debugLogAuthSelection(entry *log.Entry, auth *Auth, provider string...
function formatOauthIdentity (line 2752) | func formatOauthIdentity(auth *Auth, provider string, accountInfo string...
FILE: sdk/cliproxy/auth/conductor_availability_test.go
function TestUpdateAggregatedAvailability_UnavailableWithoutNextRetryDoesNotBlockAuth (line 8) | func TestUpdateAggregatedAvailability_UnavailableWithoutNextRetryDoesNot...
function TestUpdateAggregatedAvailability_FutureNextRetryBlocksAuth (line 33) | func TestUpdateAggregatedAvailability_FutureNextRetryBlocksAuth(t *testi...
FILE: sdk/cliproxy/auth/conductor_executor_replace_test.go
type replaceAwareExecutor (line 12) | type replaceAwareExecutor struct
method Identifier (line 19) | func (e *replaceAwareExecutor) Identifier() string {
method Execute (line 23) | func (e *replaceAwareExecutor) Execute(context.Context, *Auth, cliprox...
method ExecuteStream (line 27) | func (e *replaceAwareExecutor) ExecuteStream(context.Context, *Auth, c...
method Refresh (line 33) | func (e *replaceAwareExecutor) Refresh(_ context.Context, auth *Auth) ...
method CountTokens (line 37) | func (e *replaceAwareExecutor) CountTokens(context.Context, *Auth, cli...
method HttpRequest (line 41) | func (e *replaceAwareExecutor) HttpRequest(context.Context, *Auth, *ht...
method CloseExecutionSession (line 45) | func (e *replaceAwareExecutor) CloseExecutionSession(sessionID string) {
method ClosedSessionIDs (line 51) | func (e *replaceAwareExecutor) ClosedSessionIDs() []string {
function TestManagerRegisterExecutorClosesReplacedExecutionSessions (line 59) | func TestManagerRegisterExecutorClosesReplacedExecutionSessions(t *testi...
function TestManagerExecutorReturnsRegisteredExecutor (line 81) | func TestManagerExecutorReturnsRegisteredExecutor(t *testing.T) {
FILE: sdk/cliproxy/auth/conductor_overrides_test.go
function TestManager_ShouldRetryAfterError_RespectsAuthRequestRetryOverride (line 15) | func TestManager_ShouldRetryAfterError_RespectsAuthRequestRetryOverride(...
type credentialRetryLimitExecutor (line 65) | type credentialRetryLimitExecutor struct
method Identifier (line 72) | func (e *credentialRetryLimitExecutor) Identifier() string {
method Execute (line 76) | func (e *credentialRetryLimitExecutor) Execute(context.Context, *Auth,...
method ExecuteStream (line 81) | func (e *credentialRetryLimitExecutor) ExecuteStream(context.Context, ...
method Refresh (line 86) | func (e *credentialRetryLimitExecutor) Refresh(_ context.Context, auth...
method CountTokens (line 90) | func (e *credentialRetryLimitExecutor) CountTokens(context.Context, *A...
method HttpRequest (line 95) | func (e *credentialRetryLimitExecutor) HttpRequest(context.Context, *A...
method recordCall (line 99) | func (e *credentialRetryLimitExecutor) recordCall() {
method Calls (line 105) | func (e *credentialRetryLimitExecutor) Calls() int {
function newCredentialRetryLimitTestManager (line 111) | func newCredentialRetryLimitTestManager(t *testing.T, maxRetryCredential...
function TestManager_MaxRetryCredentials_LimitsCrossCredentialRetries (line 143) | func TestManager_MaxRetryCredentials_LimitsCrossCredentialRetries(t *tes...
function TestManager_MarkResult_RespectsAuthDisableCoolingOverride (line 194) | func TestManager_MarkResult_RespectsAuthDisableCoolingOverride(t *testin...
FILE: sdk/cliproxy/auth/conductor_scheduler_refresh_test.go
type schedulerProviderTestExecutor (line 13) | type schedulerProviderTestExecutor struct
method Identifier (line 17) | func (e schedulerProviderTestExecutor) Identifier() string { return e....
method Execute (line 19) | func (e schedulerProviderTestExecutor) Execute(ctx context.Context, au...
method ExecuteStream (line 23) | func (e schedulerProviderTestExecutor) ExecuteStream(ctx context.Conte...
method Refresh (line 27) | func (e schedulerProviderTestExecutor) Refresh(ctx context.Context, au...
method CountTokens (line 31) | func (e schedulerProviderTestExecutor) CountTokens(ctx context.Context...
method HttpRequest (line 35) | func (e schedulerProviderTestExecutor) HttpRequest(ctx context.Context...
function TestManager_RefreshSchedulerEntry_RebuildsSupportedModelSetAfterModelRegistration (line 39) | func TestManager_RefreshSchedulerEntry_RebuildsSupportedModelSetAfterMod...
function TestManager_PickNext_RebuildsSchedulerAfterModelCooldownError (line 107) | func TestManager_PickNext_RebuildsSchedulerAfterModelCooldownError(t *te...
FILE: sdk/cliproxy/auth/conductor_update_test.go
function TestManager_Update_PreservesModelStates (line 8) | func TestManager_Update_PreservesModelStates(t *testing.T) {
FILE: sdk/cliproxy/auth/errors.go
type Error (line 4) | type Error struct
method Error (line 16) | func (e *Error) Error() string {
method StatusCode (line 27) | func (e *Error) StatusCode() int {
FILE: sdk/cliproxy/auth/oauth_model_alias.go
type modelAliasEntry (line 10) | type modelAliasEntry interface
type oauthModelAliasTable (line 15) | type oauthModelAliasTable struct
function compileOAuthModelAliasTable (line 20) | func compileOAuthModelAliasTable(aliases map[string][]internalconfig.OAu...
method SetOAuthModelAlias (line 61) | func (m *Manager) SetOAuthModelAlias(aliases map[string][]internalconfig...
method applyOAuthModelAlias (line 75) | func (m *Manager) applyOAuthModelAlias(auth *Auth, requestedModel string...
function modelAliasLookupCandidates (line 83) | func modelAliasLookupCandidates(requestedModel string) (thinking.SuffixR...
function preserveResolvedModelSuffix (line 100) | func preserveResolvedModelSuffix(resolved string, requestResult thinking...
function resolveModelAliasPoolFromConfigModels (line 114) | func resolveModelAliasPoolFromConfigModels(requestedModel string, models...
function resolveModelAliasFromConfigModels (line 170) | func resolveModelAliasFromConfigModels(requestedModel string, models []m...
method resolveOAuthUpstreamModel (line 185) | func (m *Manager) resolveOAuthUpstreamModel(auth *Auth, requestedModel s...
function resolveUpstreamModelFromAliasTable (line 189) | func resolveUpstreamModelFromAliasTable(m *Manager, auth *Auth, requeste...
function modelAliasChannel (line 247) | func modelAliasChannel(auth *Auth) string {
function OAuthModelAliasChannel (line 269) | func OAuthModelAliasChannel(provider, authKind string) string {
FILE: sdk/cliproxy/auth/oauth_model_alias_test.go
function TestResolveOAuthUpstreamModel_SuffixPreservation (line 9) | func TestResolveOAuthUpstreamModel_SuffixPreservation(t *testing.T) {
function createAuthForChannel (line 146) | func createAuthForChannel(channel string) *Auth {
function TestOAuthModelAliasChannel_Kimi (line 171) | func TestOAuthModelAliasChannel_Kimi(t *testing.T) {
function TestApplyOAuthModelAlias_SuffixPreservation (line 179) | func TestApplyOAuthModelAlias_SuffixPreservation(t *testing.T) {
FILE: sdk/cliproxy/auth/openai_compat_pool_test.go
type openAICompatPoolExecutor (line 14) | type openAICompatPoolExecutor struct
method Identifier (line 27) | func (e *openAICompatPoolExecutor) Identifier() string { return e.id }
method Execute (line 29) | func (e *openAICompatPoolExecutor) Execute(ctx context.Context, auth *...
method ExecuteStream (line 43) | func (e *openAICompatPoolExecutor) ExecuteStream(ctx context.Context, ...
method Refresh (line 70) | func (e *openAICompatPoolExecutor) Refresh(_ context.Context, auth *Au...
method CountTokens (line 74) | func (e *openAICompatPoolExecutor) CountTokens(ctx context.Context, au...
method HttpRequest (line 88) | func (e *openAICompatPoolExecutor) HttpRequest(ctx context.Context, au...
method ExecuteModels (line 95) | func (e *openAICompatPoolExecutor) ExecuteModels() []string {
method CountModels (line 103) | func (e *openAICompatPoolExecutor) CountModels() []string {
method StreamModels (line 111) | func (e *openAICompatPoolExecutor) StreamModels() []string {
function newOpenAICompatPoolTestManager (line 119) | func newOpenAICompatPoolTestManager(t *testing.T, alias string, models [...
function TestManagerExecuteCount_OpenAICompatAliasPoolStopsOnInvalidRequest (line 156) | func TestManagerExecuteCount_OpenAICompatAliasPoolStopsOnInvalidRequest(...
function TestResolveModelAliasPoolFromConfigModels (line 177) | func TestResolveModelAliasPoolFromConfigModels(t *testing.T) {
function TestManagerExecute_OpenAICompatAliasPoolRotatesWithinAuth (line 195) | func TestManagerExecute_OpenAICompatAliasPoolRotatesWithinAuth(t *testin...
function TestManagerExecute_OpenAICompatAliasPoolStopsOnBadRequest (line 225) | func TestManagerExecute_OpenAICompatAliasPoolStopsOnBadRequest(t *testin...
function TestManagerExecute_OpenAICompatAliasPoolFallsBackWithinSameAuth (line 246) | func TestManagerExecute_OpenAICompatAliasPoolFallsBackWithinSameAuth(t *...
function TestManagerExecuteStream_OpenAICompatAliasPoolRetriesOnEmptyBootstrap (line 273) | func TestManagerExecuteStream_OpenAICompatAliasPoolRetriesOnEmptyBootstr...
function TestManagerExecuteStream_OpenAICompatAliasPoolFallsBackBeforeFirstByte (line 309) | func TestManagerExecuteStream_OpenAICompatAliasPoolFallsBackBeforeFirstB...
function TestManagerExecuteStream_OpenAICompatAliasPoolStopsOnInvalidRequest (line 346) | func TestManagerExecuteStream_OpenAICompatAliasPoolStopsOnInvalidRequest...
function TestManagerExecuteCount_OpenAICompatAliasPoolRotatesWithinAuth (line 367) | func TestManagerExecuteCount_OpenAICompatAliasPoolRotatesWithinAuth(t *t...
function TestManagerExecuteStream_OpenAICompatAliasPoolStopsOnInvalidBootstrap (line 394) | func TestManagerExecuteStream_OpenAICompatAliasPoolStopsOnInvalidBootstr...
FILE: sdk/cliproxy/auth/persist_policy.go
type skipPersistContextKey (line 5) | type skipPersistContextKey struct
function WithSkipPersist (line 10) | func WithSkipPersist(ctx context.Context) context.Context {
function shouldSkipPersist (line 17) | func shouldSkipPersist(ctx context.Context) bool {
FILE: sdk/cliproxy/auth/persist_policy_test.go
type countingStore (line 9) | type countingStore struct
method List (line 13) | func (s *countingStore) List(context.Context) ([]*Auth, error) { retur...
method Save (line 15) | func (s *countingStore) Save(context.Context, *Auth) (string, error) {
method Delete (line 20) | func (s *countingStore) Delete(context.Context, string) error { return...
function TestWithSkipPersist_DisablesUpdatePersistence (line 22) | func TestWithSkipPersist_DisablesUpdatePersistence(t *testing.T) {
function TestWithSkipPersist_DisablesRegisterPersistence (line 47) | func TestWithSkipPersist_DisablesRegisterPersistence(t *testing.T) {
FILE: sdk/cliproxy/auth/scheduler.go
type schedulerStrategy (line 15) | type schedulerStrategy
constant schedulerStrategyCustom (line 18) | schedulerStrategyCustom schedulerStrategy = iota
constant schedulerStrategyRoundRobin (line 19) | schedulerStrategyRoundRobin
constant schedulerStrategyFillFirst (line 20) | schedulerStrategyFillFirst
type scheduledState (line 24) | type scheduledState
constant scheduledStateReady (line 27) | scheduledStateReady scheduledState = iota
constant scheduledStateCooldown (line 28) | scheduledStateCooldown
constant scheduledStateBlocked (line 29) | scheduledStateBlocked
constant scheduledStateDisabled (line 30) | scheduledStateDisabled
type authScheduler (line 34) | type authScheduler struct
method setSelector (line 123) | func (s *authScheduler) setSelector(selector Selector) {
method rebuild (line 134) | func (s *authScheduler) rebuild(auths []*Auth) {
method upsertAuth (line 150) | func (s *authScheduler) upsertAuth(auth *Auth) {
method removeAuth (line 160) | func (s *authScheduler) removeAuth(authID string) {
method pickSingle (line 174) | func (s *authScheduler) pickSingle(ctx context.Context, provider, mode...
method pickMixed (line 214) | func (s *authScheduler) pickMixed(ctx context.Context, providers []str...
method mixedUnavailableErrorLocked (line 318) | func (s *authScheduler) mixedUnavailableErrorLocked(providers []string...
method upsertAuthLocked (line 395) | func (s *authScheduler) upsertAuthLocked(auth *Auth, now time.Time) {
method removeAuthLocked (line 416) | func (s *authScheduler) removeAuthLocked(authID string) {
method ensureProviderLocked (line 429) | func (s *authScheduler) ensureProviderLocked(providerKey string) *prov...
type providerScheduler (line 43) | type providerScheduler struct
method upsertAuthLocked (line 487) | func (p *providerScheduler) upsertAuthLocked(meta *scheduledAuthMeta, ...
method removeAuthLocked (line 505) | func (p *providerScheduler) removeAuthLocked(authID string) {
method ensureModelLocked (line 518) | func (p *providerScheduler) ensureModelLocked(modelKey string, now tim...
type scheduledAuthMeta (line 50) | type scheduledAuthMeta struct
method supportsModel (line 543) | func (m *scheduledAuthMeta) supportsModel(modelKey string) bool {
type modelScheduler (line 60) | type modelScheduler struct
method upsertEntryLocked (line 556) | func (m *modelScheduler) upsertEntryLocked(meta *scheduledAuthMeta, no...
method removeEntryLocked (line 600) | func (m *modelScheduler) removeEntryLocked(authID string) {
method promoteExpiredLocked (line 612) | func (m *modelScheduler) promoteExpiredLocked(now time.Time) {
method pickReadyLocked (line 647) | func (m *modelScheduler) pickReadyLocked(preferWebsocket bool, strateg...
method highestReadyPriorityLocked (line 661) | func (m *modelScheduler) highestReadyPriorityLocked(preferWebsocket bo...
method pickReadyAtPriorityLocked (line 683) | func (m *modelScheduler) pickReadyAtPriorityLocked(preferWebsocket boo...
method unavailableErrorLocked (line 708) | func (m *modelScheduler) unavailableErrorLocked(provider, model string...
method availabilitySummaryLocked (line 729) | func (m *modelScheduler) availabilitySummaryLocked(predicate func(*sch...
method rebuildIndexesLocked (line 756) | func (m *modelScheduler) rebuildIndexesLocked() {
type scheduledAuth (line 69) | type scheduledAuth struct
type readyBucket (line 77) | type readyBucket struct
type readyView (line 83) | type readyView struct
method pickFirst (line 845) | func (v *readyView) pickFirst(predicate func(*scheduledAuth) bool) *sc...
method pickRoundRobin (line 855) | func (v *readyView) pickRoundRobin(predicate func(*scheduledAuth) bool...
method pickGroupedRoundRobin (line 879) | func (v *readyView) pickGroupedRoundRobin(predicate func(*scheduledAut...
type childBucket (line 92) | type childBucket struct
type cooldownQueue (line 98) | type cooldownQueue
function newAuthScheduler (line 101) | func newAuthScheduler(selector Selector) *authScheduler {
function selectorStrategy (line 111) | func selectorStrategy(selector Selector) schedulerStrategy {
function triedPredicate (line 353) | func triedPredicate(tried map[string]struct{}) func(*scheduledAuth) bool {
function normalizeProviderKeys (line 367) | func normalizeProviderKeys(providers []string) []string {
function containsProvider (line 385) | func containsProvider(providers []string, provider string) bool {
function buildScheduledAuthMeta (line 446) | func buildScheduledAuthMeta(auth *Auth) *scheduledAuthMeta {
function supportedModelSetForAuth (line 463) | func supportedModelSetForAuth(authID string) map[string]struct{} {
function buildReadyBucket (line 803) | func buildReadyBucket(entries []*scheduledAuth) *readyBucket {
function buildReadyView (line 817) | func buildReadyView(entries []*scheduledAuth) readyView {
FILE: sdk/cliproxy/auth/scheduler_benchmark_test.go
type schedulerBenchmarkExecutor (line 13) | type schedulerBenchmarkExecutor struct
method Identifier (line 17) | func (e schedulerBenchmarkExecutor) Identifier() string { return e.id }
method Execute (line 19) | func (e schedulerBenchmarkExecutor) Execute(ctx context.Context, auth ...
method ExecuteStream (line 23) | func (e schedulerBenchmarkExecutor) ExecuteStream(ctx context.Context,...
method Refresh (line 27) | func (e schedulerBenchmarkExecutor) Refresh(ctx context.Context, auth ...
method CountTokens (line 31) | func (e schedulerBenchmarkExecutor) CountTokens(ctx context.Context, a...
method HttpRequest (line 35) | func (e schedulerBenchmarkExecutor) HttpRequest(ctx context.Context, a...
function benchmarkManagerSetup (line 39) | func benchmarkManagerSetup(b *testing.B, total int, mixed bool, withPrio...
function BenchmarkManagerPickNext500 (line 84) | func BenchmarkManagerPickNext500(b *testing.B) {
function BenchmarkManagerPickNext1000 (line 103) | func BenchmarkManagerPickNext1000(b *testing.B) {
function BenchmarkManagerPickNextPriority500 (line 122) | func BenchmarkManagerPickNextPriority500(b *testing.B) {
function BenchmarkManagerPickNextPriority1000 (line 141) | func BenchmarkManagerPickNextPriority1000(b *testing.B) {
function BenchmarkManagerPickNextMixed500 (line 160) | func BenchmarkManagerPickNextMixed500(b *testing.B) {
function BenchmarkManagerPickNextMixedPriority500 (line 179) | func BenchmarkManagerPickNextMixedPriority500(b *testing.B) {
function BenchmarkManagerPickNextAndMarkResult1000 (line 198) | func BenchmarkManagerPickNextAndMarkResult1000(b *testing.B) {
FILE: sdk/cliproxy/auth/scheduler_test.go
type schedulerTestExecutor (line 13) | type schedulerTestExecutor struct
method Identifier (line 15) | func (schedulerTestExecutor) Identifier() string { return "test" }
method Execute (line 17) | func (schedulerTestExecutor) Execute(ctx context.Context, auth *Auth, ...
method ExecuteStream (line 21) | func (schedulerTestExecutor) ExecuteStream(ctx context.Context, auth *...
method Refresh (line 25) | func (schedulerTestExecutor) Refresh(ctx context.Context, auth *Auth) ...
method CountTokens (line 29) | func (schedulerTestExecutor) CountTokens(ctx context.Context, auth *Au...
method HttpRequest (line 33) | func (schedulerTestExecutor) HttpRequest(ctx context.Context, auth *Au...
type trackingSelector (line 37) | type trackingSelector struct
method Pick (line 42) | func (s *trackingSelector) Pick(ctx context.Context, provider, model s...
function newSchedulerForTest (line 54) | func newSchedulerForTest(selector Selector, auths ...*Auth) *authSchedul...
function registerSchedulerModels (line 60) | func registerSchedulerModels(t *testing.T, provider string, model string...
function TestSchedulerPick_RoundRobinHighestPriority (line 73) | func TestSchedulerPick_RoundRobinHighestPriority(t *testing.T) {
function TestSchedulerPick_FillFirstSticksToFirstReady (line 98) | func TestSchedulerPick_FillFirstSticksToFirstReady(t *testing.T) {
function TestSchedulerPick_PromotesExpiredCooldownBeforePick (line 122) | func TestSchedulerPick_PromotesExpiredCooldownBeforePick(t *testing.T) {
function TestSchedulerPick_GeminiVirtualParentUsesTwoLevelRotation (line 154) | func TestSchedulerPick_GeminiVirtualParentUsesTwoLevelRotation(t *testin...
function TestSchedulerPick_CodexWebsocketPrefersWebsocketEnabledSubset (line 185) | func TestSchedulerPick_CodexWebsocketPrefersWebsocketEnabledSubset(t *te...
function TestSchedulerPick_MixedProvidersUsesProviderRotationOverReadyCandidates (line 211) | func TestSchedulerPick_MixedProvidersUsesProviderRotationOverReadyCandid...
function TestSchedulerPick_MixedProvidersPrefersHighestPriorityTier (line 240) | func TestSchedulerPick_MixedProvidersPrefersHighestPriorityTier(t *testi...
function TestManager_PickNextMixed_UsesProviderRotationBeforeCredentialRotation (line 275) | func TestManager_PickNextMixed_UsesProviderRotationBeforeCredentialRotat...
function TestManagerCustomSelector_FallsBackToLegacyPath (line 310) | func TestManagerCustomSelector_FallsBackToLegacyPath(t *testing.T) {
function TestManager_InitializesSchedulerForBuiltInSelector (line 337) | func TestManager_InitializesSchedulerForBuiltInSelector(t *testing.T) {
function TestManager_SchedulerTracksRegisterAndUpdate (line 354) | func TestManager_SchedulerTracksRegisterAndUpdate(t *testing.T) {
function TestManager_PickNextMixed_UsesSchedulerRotation (line 386) | func TestManager_PickNextMixed_UsesSchedulerRotation(t *testing.T) {
function TestManager_PickNextMixed_SkipsProvidersWithoutExecutors (line 421) | func TestManager_PickNextMixed_SkipsProvidersWithoutExecutors(t *testing...
function TestManager_SchedulerTracksMarkResultCooldownAndRecovery (line 448) | func TestManager_SchedulerTracksMarkResultCooldownAndRecovery(t *testing...
FILE: sdk/cliproxy/auth/selector.go
type RoundRobinSelector (line 21) | type RoundRobinSelector struct
method Pick (line 255) | func (s *RoundRobinSelector) Pick(ctx context.Context, provider, model...
method ensureCursorKey (line 318) | func (s *RoundRobinSelector) ensureCursorKey(key string, limit int) {
type FillFirstSelector (line 30) | type FillFirstSelector struct
method Pick (line 354) | func (s *FillFirstSelector) Pick(ctx context.Context, provider, model ...
type blockReason (line 32) | type blockReason
constant blockReasonNone (line 35) | blockReasonNone blockReason = iota
constant blockReasonCooldown (line 36) | blockReasonCooldown
constant blockReasonDisabled (line 37) | blockReasonDisabled
constant blockReasonOther (line 38) | blockReasonOther
type modelCooldownError (line 41) | type modelCooldownError struct
method Error (line 58) | func (e *modelCooldownError) Error() string {
method StatusCode (line 95) | func (e *modelCooldownError) StatusCode() int {
method Headers (line 99) | func (e *modelCooldownError) Headers() http.Header {
function newModelCooldownError (line 47) | func newModelCooldownError(model, provider string, resetIn time.Duration...
function authPriority (line 110) | func authPriority(auth *Auth) int {
function canonicalModelKey (line 125) | func canonicalModelKey(model string) string {
function authWebsocketsEnabled (line 138) | func authWebsocketsEnabled(auth *Auth) bool {
function preferCodexWebsocketAuths (line 170) | func preferCodexWebsocketAuths(ctx context.Context, provider string, ava...
function collectAvailableByPriority (line 194) | func collectAvailableByPriority(auths []*Auth, model string, now time.Ti...
function getAvailableAuths (line 214) | func getAvailableAuths(auths []*Auth, provider, model string, now time.T...
function groupByVirtualParent (line 328) | func groupByVirtualParent(auths []*Auth) (map[string][]*Auth, []string) {
function isAuthBlockedForModel (line 365) | func isAuthBlockedForModel(auth *Auth, model string, now time.Time) (boo...
FILE: sdk/cliproxy/auth/selector_test.go
function TestFillFirstSelectorPick_Deterministic (line 15) | func TestFillFirstSelectorPick_Deterministic(t *testing.T) {
function TestRoundRobinSelectorPick_CyclesDeterministic (line 37) | func TestRoundRobinSelectorPick_CyclesDeterministic(t *testing.T) {
function TestRoundRobinSelectorPick_PriorityBuckets (line 62) | func TestRoundRobinSelectorPick_PriorityBuckets(t *testing.T) {
function TestFillFirstSelectorPick_PriorityFallbackCooldown (line 90) | func TestFillFirstSelectorPick_PriorityFallbackCooldown(t *testing.T) {
function TestRoundRobinSelectorPick_Concurrent (line 125) | func TestRoundRobinSelectorPick_Concurrent(t *testing.T) {
function TestSelectorPick_AllCooldownReturnsModelCooldownError (line 181) | func TestSelectorPick_AllCooldownReturnsModelCooldownError(t *testing.T) {
function TestIsAuthBlockedForModel_UnavailableWithoutNextRetryIsNotBlocked (line 284) | func TestIsAuthBlockedForModel_UnavailableWithoutNextRetryIsNotBlocked(t...
function TestFillFirstSelectorPick_ThinkingSuffixFallsBackToBaseModelState (line 314) | func TestFillFirstSelectorPick_ThinkingSuffixFallsBackToBaseModelState(t...
function TestRoundRobinSelectorPick_ThinkingSuffixSharesCursor (line 354) | func TestRoundRobinSelectorPick_ThinkingSuffixSharesCursor(t *testing.T) {
function TestRoundRobinSelectorPick_CursorKeyCap (line 382) | func TestRoundRobinSelectorPick_CursorKeyCap(t *testing.T) {
function TestRoundRobinSelectorPick_GeminiCLICredentialGrouping (line 406) | func TestRoundRobinSelectorPick_GeminiCLICredentialGrouping(t *testing.T) {
function TestRoundRobinSelectorPick_SingleParentFallsBackToFlat (line 461) | func TestRoundRobinSelectorPick_SingleParentFallsBackToFlat(t *testing.T) {
function TestRoundRobinSelectorPick_MixedVirtualAndNonVirtualFallsBackToFlat (line 497) | func TestRoundRobinSelectorPick_MixedVirtualAndNonVirtualFallsBackToFlat...
FILE: sdk/cliproxy/auth/status.go
type Status (line 4) | type Status
constant StatusUnknown (line 8) | StatusUnknown Status = "unknown"
constant StatusActive (line 10) | StatusActive Status = "active"
constant StatusPending (line 12) | StatusPending Status = "pending"
constant StatusRefreshing (line 14) | StatusRefreshing Status = "refreshing"
constant StatusError (line 16) | StatusError Status = "error"
constant StatusDisabled (line 18) | StatusDisabled Status = "disabled"
FILE: sdk/cliproxy/auth/store.go
type Store (line 6) | type Store interface
FILE: sdk/cliproxy/auth/types.go
type PostAuthHook (line 21) | type PostAuthHook
type RequestInfo (line 25) | type RequestInfo struct
type requestInfoKey (line 30) | type requestInfoKey struct
function WithRequestInfo (line 33) | func WithRequestInfo(ctx context.Context, info *RequestInfo) context.Con...
function GetRequestInfo (line 38) | func GetRequestInfo(ctx context.Context) *RequestInfo {
type Auth (line 46) | type Auth struct
method Clone (line 129) | func (a *Auth) Clone() *Auth {
method indexSeed (line 165) | func (a *Auth) indexSeed() string {
method EnsureIndex (line 219) | func (a *Auth) EnsureIndex() string {
method ProxyInfo (line 255) | func (a *Auth) ProxyInfo() string {
method DisableCoolingOverride (line 271) | func (a *Auth) DisableCoolingOverride() (bool, bool) {
method ToolPrefixDisabled (line 291) | func (a *Auth) ToolPrefixDisabled() bool {
method RequestRetryOverride (line 307) | func (a *Auth) RequestRetryOverride() (int, bool) {
method AccountInfo (line 388) | func (a *Auth) AccountInfo() (string, string) {
method ExpirationTime (line 442) | func (a *Auth) ExpirationTime() (time.Time, bool) {
type QuotaState (line 99) | type QuotaState struct
type ModelState (line 111) | type ModelState struct
method Clone (line 239) | func (m *ModelState) Clone() *ModelState {
function stableAuthIndex (line 156) | func stableAuthIndex(seed string) string {
function parseBoolAny (line 330) | func parseBoolAny(val any) (bool, bool) {
function parseIntAny (line 357) | func parseIntAny(val any) (int, bool) {
function RegisterRefreshLeadProvider (line 457) | func RegisterRefreshLeadProvider(provider string, factory func() *time.D...
function expirationFromMap (line 469) | func expirationFromMap(meta map[string]any) (time.Time, bool) {
function ProviderRefreshLead (line 501) | func ProviderRefreshLead(provider string, runtime any) *time.Duration {
function parseTimeValue (line 522) | func parseTimeValue(v any) (time.Time, bool) {
function normaliseUnix (line 559) | func normaliseUnix(raw int64) time.Time {
FILE: sdk/cliproxy/auth/types_test.go
function TestToolPrefixDisabled (line 5) | func TestToolPrefixDisabled(t *testing.T) {
function TestEnsureIndexUsesCredentialIdentity (line 37) | func TestEnsureIndexUsesCredentialIdentity(t *testing.T) {
FILE: sdk/cliproxy/builder.go
type Builder (line 21) | type Builder struct
method WithConfig (line 82) | func (b *Builder) WithConfig(cfg *config.Config) *Builder {
method WithConfigPath (line 94) | func (b *Builder) WithConfigPath(path string) *Builder {
method WithTokenClientProvider (line 100) | func (b *Builder) WithTokenClientProvider(provider TokenClientProvider...
method WithAPIKeyClientProvider (line 106) | func (b *Builder) WithAPIKeyClientProvider(provider APIKeyClientProvid...
method WithWatcherFactory (line 112) | func (b *Builder) WithWatcherFactory(factory WatcherFactory) *Builder {
method WithHooks (line 118) | func (b *Builder) WithHooks(h Hooks) *Builder {
method WithAuthManager (line 124) | func (b *Builder) WithAuthManager(mgr *sdkAuth.Manager) *Builder {
method WithRequestAccessManager (line 130) | func (b *Builder) WithRequestAccessManager(mgr *sdkaccess.Manager) *Bu...
method WithCoreAuthManager (line 136) | func (b *Builder) WithCoreAuthManager(mgr *coreauth.Manager) *Builder {
method WithServerOptions (line 142) | func (b *Builder) WithServerOptions(opts ...api.ServerOption) *Builder {
method WithLocalManagementPassword (line 148) | func (b *Builder) WithLocalManagementPassword(password string) *Builder {
method WithPostAuthHook (line 158) | func (b *Builder) WithPostAuthHook(hook coreauth.PostAuthHook) *Builder {
method Build (line 167) | func (b *Builder) Build() (*Service, error) {
type Hooks (line 56) | type Hooks struct
function NewBuilder (line 71) | func NewBuilder() *Builder {
FILE: sdk/cliproxy/executor/context.go
type downstreamWebsocketContextKey (line 5) | type downstreamWebsocketContextKey struct
function WithDownstreamWebsocket (line 8) | func WithDownstreamWebsocket(ctx context.Context) context.Context {
function DownstreamWebsocket (line 16) | func DownstreamWebsocket(ctx context.Context) bool {
FILE: sdk/cliproxy/executor/types.go
constant RequestedModelMetadataKey (line 11) | RequestedModelMetadataKey = "requested_model"
constant PinnedAuthMetadataKey (line 15) | PinnedAuthMetadataKey = "pinned_auth_id"
constant SelectedAuthMetadataKey (line 17) | SelectedAuthMetadataKey = "selected_auth_id"
constant SelectedAuthCallbackMetadataKey (line 19) | SelectedAuthCallbackMetadataKey = "selected_auth_callback"
constant ExecutionSessionMetadataKey (line 21) | ExecutionSessionMetadataKey = "execution_session_id"
type Request (line 25) | type Request struct
type Options (line 37) | type Options struct
type Response (line 55) | type Response struct
type StreamChunk (line 65) | type StreamChunk struct
type StreamResult (line 74) | type StreamResult struct
type StatusError (line 84) | type StatusError interface
FILE: sdk/cliproxy/model_registry.go
type ModelRegistry (line 12) | type ModelRegistry interface
function GlobalModelRegistry (line 23) | func GlobalModelRegistry() ModelRegistry {
function SetGlobalModelRegistryHook (line 28) | func SetGlobalModelRegistryHook(hook ModelRegistryHook) {
FILE: sdk/cliproxy/pipeline/context.go
type Context (line 13) | type Context struct
type Hook (line 27) | type Hook interface
type HookFunc (line 34) | type HookFunc struct
method BeforeExecute (line 41) | func (h HookFunc) BeforeExecute(ctx context.Context, execCtx *Context) {
method AfterExecute (line 48) | func (h HookFunc) AfterExecute(ctx context.Context, execCtx *Context, ...
method OnStreamChunk (line 55) | func (h HookFunc) OnStreamChunk(ctx context.Context, execCtx *Context,...
type RoundTripperProvider (line 62) | type RoundTripperProvider interface
FILE: sdk/cliproxy/pprof_server.go
type pprofServer (line 16) | type pprofServer struct
method Apply (line 44) | func (p *pprofServer) Apply(cfg *config.Config) {
method Shutdown (line 81) | func (p *pprofServer) Shutdown(ctx context.Context) error {
method startServer (line 98) | func (p *pprofServer) startServer(addr string) {
method stopServer (line 127) | func (p *pprofServer) stopServer(server *http.Server, addr string, rea...
method stopServerWithContext (line 131) | func (p *pprofServer) stopServerWithContext(ctx context.Context, serve...
function newPprofServer (line 23) | func newPprofServer() *pprofServer {
method applyPprofConfig (line 27) | func (s *Service) applyPprofConfig(cfg *config.Config) {
method shutdownPprof (line 37) | func (s *Service) shutdownPprof(ctx context.Context) error {
function newPprofMux (line 149) | func newPprofMux() *http.ServeMux {
FILE: sdk/cliproxy/providers.go
function NewFileTokenClientProvider (line 11) | func NewFileTokenClientProvider() TokenClientProvider {
type fileTokenClientProvider (line 15) | type fileTokenClientProvider struct
method Load (line 17) | func (p *fileTokenClientProvider) Load(ctx context.Context, cfg *confi...
function NewAPIKeyClientProvider (line 25) | func NewAPIKeyClientProvider() APIKeyClientProvider {
type apiKeyClientProvider (line 29) | type apiKeyClientProvider struct
method Load (line 31) | func (p *apiKeyClientProvider) Load(ctx context.Context, cfg *config.C...
FILE: sdk/cliproxy/rtprovider.go
type defaultRoundTripperProvider (line 15) | type defaultRoundTripperProvider struct
method RoundTripperFor (line 25) | func (p *defaultRoundTripperProvider) RoundTripperFor(auth *coreauth.A...
function newDefaultRoundTripperProvider (line 20) | func newDefaultRoundTripperProvider() *defaultRoundTripperProvider {
FILE: sdk/cliproxy/rtprovider_test.go
function TestRoundTripperForDirectBypassesProxy (line 10) | func TestRoundTripperForDirectBypassesProxy(t *testing.T) {
FILE: sdk/cliproxy/service.go
type Service (line 32) | type Service struct
method RegisterUsagePlugin (line 99) | func (s *Service) RegisterUsagePlugin(plugin usage.Plugin) {
method ensureAuthUpdateQueue (line 114) | func (s *Service) ensureAuthUpdateQueue(ctx context.Context) {
method consumeAuthUpdates (line 129) | func (s *Service) consumeAuthUpdates(ctx context.Context) {
method emitAuthUpdate (line 153) | func (s *Service) emitAuthUpdate(ctx context.Context, update watcher.A...
method handleAuthUpdate (line 174) | func (s *Service) handleAuthUpdate(ctx context.Context, update watcher...
method ensureWebsocketGateway (line 204) | func (s *Service) ensureWebsocketGateway() {
method wsOnConnected (line 222) | func (s *Service) wsOnConnected(channelID string) {
method wsOnDisconnected (line 255) | func (s *Service) wsOnDisconnected(channelID string, reason error) {
method applyCoreAuthAddOrUpdate (line 275) | func (s *Service) applyCoreAuthAddOrUpdate(ctx context.Context, auth *...
method applyCoreAuthRemoval (line 321) | func (s *Service) applyCoreAuthRemoval(ctx context.Context, id string) {
method applyRetryConfig (line 341) | func (s *Service) applyRetryConfig(cfg *config.Config) {
method ensureExecutorsForAuth (line 369) | func (s *Service) ensureExecutorsForAuth(a *coreauth.Auth) {
method ensureExecutorsForAuthWithMode (line 373) | func (s *Service) ensureExecutorsForAuthWithMode(a *coreauth.Auth, for...
method registerResolvedModelsForAuth (line 437) | func (s *Service) registerResolvedModelsForAuth(a *coreauth.Auth, prov...
method rebindExecutors (line 449) | func (s *Service) rebindExecutors() {
method Run (line 475) | func (s *Service) Run(ctx context.Context) error {
method Shutdown (line 709) | func (s *Service) Shutdown(ctx context.Context) error {
method ensureAuthDir (line 771) | func (s *Service) ensureAuthDir() error {
method registerModelsForAuth (line 790) | func (s *Service) registerModelsForAuth(a *coreauth.Auth) {
method refreshModelRegistrationForAuth (line 1013) | func (s *Service) refreshModelRegistrationForAuth(current *coreauth.Au...
method latestAuthForModelRegistration (line 1042) | func (s *Service) latestAuthForModelRegistration(authID string) (*core...
method resolveConfigClaudeKey (line 1053) | func (s *Service) resolveConfigClaudeKey(auth *coreauth.Auth) *config....
method resolveConfigGeminiKey (line 1092) | func (s *Service) resolveConfigGeminiKey(auth *coreauth.Auth) *config....
method resolveConfigVertexCompatKey (line 1118) | func (s *Service) resolveConfigVertexCompatKey(auth *coreauth.Auth) *c...
method resolveConfigCodexKey (line 1152) | func (s *Service) resolveConfigCodexKey(auth *coreauth.Auth) *config.C...
method oauthExcludedModels (line 1178) | func (s *Service) oauthExcludedModels(provider, authKind string) []str...
function newDefaultAuthManager (line 104) | func newDefaultAuthManager() *sdkAuth.Manager {
function openAICompatInfoFromAuth (line 349) | func openAICompatInfoFromAuth(a *coreauth.Auth) (providerKey string, com...
function applyExcludedModels (line 1191) | func applyExcludedModels(models []*ModelInfo, excluded []string) []*Mode...
function applyModelPrefixes (line 1226) | func applyModelPrefixes(models []*ModelInfo, prefix string, forceModelPr...
function matchWildcard (line 1269) | func matchWildcard(pattern, value string) bool {
type modelEntry (line 1312) | type modelEntry interface
function buildConfigModels (line 1317) | func buildConfigModels[T modelEntry](models []T, ownedBy, modelType stri...
function buildVertexCompatConfigModels (line 1362) | func buildVertexCompatConfigModels(entry *config.VertexCompatKey) []*Mod...
function buildGeminiConfigModels (line 1369) | func buildGeminiConfigModels(entry *config.GeminiKey) []*ModelInfo {
function buildClaudeConfigModels (line 1376) | func buildClaudeConfigModels(entry *config.ClaudeKey) []*ModelInfo {
function buildCodexConfigModels (line 1383) | func buildCodexConfigModels(entry *config.CodexKey) []*ModelInfo {
function rewriteModelInfoName (line 1390) | func rewriteModelInfoName(name, oldID, newID string) string {
function applyOAuthModelAlias (line 1416) | func applyOAuthModelAlias(cfg *config.Config, provider, authKind string,...
FILE: sdk/cliproxy/service_codex_executor_binding_test.go
function TestEnsureExecutorsForAuth_CodexDoesNotReplaceInNormalMode (line 10) | func TestEnsureExecutorsForAuth_CodexDoesNotReplaceInNormalMode(t *testi...
function TestEnsureExecutorsForAuthWithMode_CodexForceReplace (line 38) | func TestEnsureExecutorsForAuthWithMode_CodexForceReplace(t *testing.T) {
FILE: sdk/cliproxy/service_excluded_models_test.go
function TestRegisterModelsForAuth_UsesPreMergedExcludedModelsAttribute (line 11) | func TestRegisterModelsForAuth_UsesPreMergedExcludedModelsAttribute(t *t...
FILE: sdk/cliproxy/service_oauth_model_alias_test.go
function TestApplyOAuthModelAlias_Rename (line 9) | func TestApplyOAuthModelAlias_Rename(t *testing.T) {
function TestApplyOAuthModelAlias_ForkAddsAlias (line 33) | func TestApplyOAuthModelAlias_ForkAddsAlias(t *testing.T) {
function TestApplyOAuthModelAlias_ForkAddsMultipleAliases (line 60) | func TestApplyOAuthModelAlias_ForkAddsMultipleAliases(t *testing.T) {
FILE: sdk/cliproxy/types.go
type TokenClientProvider (line 17) | type TokenClientProvider interface
type TokenClientResult (line 32) | type TokenClientResult struct
type APIKeyClientProvider (line 39) | type APIKeyClientProvider interface
type APIKeyClientResult (line 53) | type APIKeyClientResult struct
type WatcherFactory (line 81) | type WatcherFactory
type WatcherWrapper (line 84) | type WatcherWrapper struct
method Start (line 95) | func (w *WatcherWrapper) Start(ctx context.Context) error {
method Stop (line 103) | func (w *WatcherWrapper) Stop() error {
method SetConfig (line 111) | func (w *WatcherWrapper) SetConfig(cfg *config.Config) {
method DispatchRuntimeAuthUpdate (line 121) | func (w *WatcherWrapper) DispatchRuntimeAuthUpdate(update watcher.Auth...
method SnapshotAuths (line 135) | func (w *WatcherWrapper) SnapshotAuths() []*coreauth.Auth {
method SetAuthUpdateQueue (line 143) | func (w *WatcherWrapper) SetAuthUpdateQueue(queue chan<- watcher.AuthU...
FILE: sdk/cliproxy/usage/manager.go
type Record (line 12) | type Record struct
type Detail (line 25) | type Detail struct
type Plugin (line 34) | type Plugin interface
type queueItem (line 38) | type queueItem struct
type Manager (line 44) | type Manager struct
method Start (line 66) | func (m *Manager) Start(ctx context.Context) {
method Stop (line 81) | func (m *Manager) Stop() {
method Register (line 97) | func (m *Manager) Register(plugin Plugin) {
method Publish (line 108) | func (m *Manager) Publish(ctx context.Context, record Record) {
method run (line 124) | func (m *Manager) run(ctx context.Context) {
method dispatch (line 141) | func (m *Manager) dispatch(item queueItem) {
function NewManager (line 59) | func NewManager(buffer int) *Manager {
function safeInvoke (line 157) | func safeInvoke(plugin Plugin, ctx context.Context, record Record) {
function DefaultManager (line 169) | func DefaultManager() *Manager { return defaultManager }
function RegisterPlugin (line 172) | func RegisterPlugin(plugin Plugin) { DefaultManager().Register(plugin) }
function PublishRecord (line 175) | func PublishRecord(ctx context.Context, record Record) { DefaultManager(...
function StartDefault (line 178) | func StartDefault(ctx context.Context) { DefaultManager().Start(ctx) }
function StopDefault (line 181) | func StopDefault() { DefaultManager().Stop() }
FILE: sdk/cliproxy/watcher.go
function defaultWatcherFactory (line 11) | func defaultWatcherFactory(configPath, authDir string, reload func(*conf...
FILE: sdk/config/config.go
constant DefaultPanelGitHubRepository (line 35) | DefaultPanelGitHubRepository = internalconfig.DefaultPanelGitHubRepository
function LoadConfig (line 38) | func LoadConfig(configFile string) (*Config, error) { return internalcon...
function LoadConfigOptional (line 40) | func LoadConfigOptional(configFile string, optional bool) (*Config, erro...
function SaveConfigPreserveComments (line 44) | func SaveConfigPreserveComments(configFile string, cfg *Config) error {
function SaveConfigPreserveCommentsUpdateNestedScalar (line 48) | func SaveConfigPreserveCommentsUpdateNestedScalar(configFile string, pat...
function NormalizeCommentIndentation (line 52) | func NormalizeCommentIndentation(data []byte) []byte {
FILE: sdk/logging/request_logger.go
constant defaultErrorLogsMaxFiles (line 6) | defaultErrorLogsMaxFiles = 10
function NewFileRequestLogger (line 18) | func NewFileRequestLogger(enabled bool, logsDir string, configDir string...
function NewFileRequestLoggerWithOptions (line 23) | func NewFileRequestLoggerWithOptions(enabled bool, logsDir string, confi...
FILE: sdk/proxyutil/proxy.go
type Mode (line 15) | type Mode
constant ModeInherit (line 19) | ModeInherit Mode = iota
constant ModeDirect (line 21) | ModeDirect
constant ModeProxy (line 23) | ModeProxy
constant ModeInvalid (line 25) | ModeInvalid
type Setting (line 29) | type Setting struct
function Parse (line 36) | func Parse(raw string) (Setting, error) {
function NewDirectTransport (line 72) | func NewDirectTransport() *http.Transport {
function BuildHTTPTransport (line 82) | func BuildHTTPTransport(raw string) (*http.Transport, Mode, error) {
function BuildDialer (line 119) | func BuildDialer(raw string) (proxy.Dialer, Mode, error) {
FILE: sdk/proxyutil/proxy_test.go
function TestParse (line 8) | func TestParse(t *testing.T) {
function TestBuildHTTPTransportDirectBypassesProxy (line 45) | func TestBuildHTTPTransportDirectBypassesProxy(t *testing.T) {
function TestBuildHTTPTransportHTTPProxy (line 63) | func TestBuildHTTPTransportHTTPProxy(t *testing.T) {
FILE: sdk/translator/builtin/builtin.go
function Registry (line 11) | func Registry() *sdktranslator.Registry {
function Pipeline (line 16) | func Pipeline() *sdktranslator.Pipeline {
FILE: sdk/translator/format.go
type Format (line 4) | type Format
method String (line 12) | func (f Format) String() string {
function FromString (line 7) | func FromString(v string) Format {
FILE: sdk/translator/formats.go
constant FormatOpenAI (line 5) | FormatOpenAI Format = "openai"
constant FormatOpenAIResponse (line 6) | FormatOpenAIResponse Format = "openai-response"
constant FormatClaude (line 7) | FormatClaude Format = "claude"
constant FormatGemini (line 8) | FormatGemini Format = "gemini"
constant FormatGeminiCLI (line 9) | FormatGeminiCLI Format = "gemini-cli"
constant FormatCodex (line 10) | FormatCodex Format = "codex"
constant FormatAntigravity (line 11) | FormatAntigravity Format = "antigravity"
FILE: sdk/translator/helpers.go
function TranslateRequestByFormatName (line 6) | func TranslateRequestByFormatName(from, to Format, model string, rawJSON...
function HasResponseTransformerByFormatName (line 11) | func HasResponseTransformerByFormatName(from, to Format) bool {
function TranslateStreamByFormatName (line 16) | func TranslateStreamByFormatName(ctx context.Context, from, to Format, m...
function TranslateNonStreamByFormatName (line 21) | func TranslateNonStreamByFormatName(ctx context.Context, from, to Format...
function TranslateTokenCountByFormatName (line 26) | func TranslateTokenCountByFormatName(ctx context.Context, from, to Forma...
FILE: sdk/translator/pipeline.go
type RequestEnvelope (line 6) | type RequestEnvelope struct
type ResponseEnvelope (line 14) | type ResponseEnvelope struct
type RequestMiddleware (line 23) | type RequestMiddleware
type ResponseMiddleware (line 26) | type ResponseMiddleware
type RequestHandler (line 29) | type RequestHandler
type ResponseHandler (line 32) | type ResponseHandler
type Pipeline (line 35) | type Pipeline struct
method UseRequest (line 50) | func (p *Pipeline) UseRequest(mw RequestMiddleware) {
method UseResponse (line 57) | func (p *Pipeline) UseResponse(mw ResponseMiddleware) {
method TranslateRequest (line 64) | func (p *Pipeline) TranslateRequest(ctx context.Context, from, to Form...
method TranslateResponse (line 85) | func (p *Pipeline) TranslateResponse(ctx context.Context, from, to For...
function NewPipeline (line 42) | func NewPipeline(registry *Registry) *Pipeline {
FILE: sdk/translator/registry.go
type Registry (line 9) | type Registry struct
method Register (line 24) | func (r *Registry) Register(from, to Format, request RequestTransform,...
method TranslateRequest (line 43) | func (r *Registry) TranslateRequest(from, to Format, model string, raw...
method HasResponseTransformer (line 56) | func (r *Registry) HasResponseTransformer(from, to Format) bool {
method TranslateStream (line 69) | func (r *Registry) TranslateStream(ctx context.Context, from, to Forma...
method TranslateNonStream (line 82) | func (r *Registry) TranslateNonStream(ctx context.Context, from, to Fo...
method TranslateTokenCount (line 95) | func (r *Registry) TranslateTokenCount(ctx context.Context, from, to F...
function NewRegistry (line 16) | func NewRegistry() *Registry {
function Default (line 110) | func Default() *Registry {
function Register (line 115) | func Register(from, to Format, request RequestTransform, response Respon...
function TranslateRequest (line 120) | func TranslateRequest(from, to Format, model string, rawJSON []byte, str...
function HasResponseTransformer (line 125) | func HasResponseTransformer(from, to Format) bool {
function TranslateStream (line 130) | func TranslateStream(ctx context.Context, from, to Format, model string,...
function TranslateNonStream (line 135) | func TranslateNonStream(ctx context.Context, from, to Format, model stri...
function TranslateTokenCount (line 140) | func TranslateTokenCount(ctx context.Context, from, to Format, count int...
FILE: sdk/translator/types.go
type RequestTransform (line 9) | type RequestTransform
type ResponseStreamTransform (line 14) | type ResponseStreamTransform
type ResponseNonStreamTransform (line 19) | type ResponseNonStreamTransform
type ResponseTokenCountTransform (line 23) | type ResponseTokenCountTransform
type ResponseTransform (line 27) | type ResponseTransform struct
FILE: test/amp_management_test.go
function init (line 17) | func init() {
function newAmpTestHandler (line 22) | func newAmpTestHandler(t *testing.T) (*management.Handler, string) {
function setupAmpRouter (line 48) | func setupAmpRouter(h *management.Handler) *gin.Engine {
function TestGetAmpCode (line 76) | func TestGetAmpCode(t *testing.T) {
function TestGetAmpUpstreamURL (line 103) | func TestGetAmpUpstreamURL(t *testing.T) {
function TestPutAmpUpstreamURL (line 126) | func TestPutAmpUpstreamURL(t *testing.T) {
function TestDeleteAmpUpstreamURL (line 142) | func TestDeleteAmpUpstreamURL(t *testing.T) {
function TestGetAmpUpstreamAPIKey (line 156) | func TestGetAmpUpstreamAPIKey(t *testing.T) {
function TestPutAmpUpstreamAPIKey (line 180) | func TestPutAmpUpstreamAPIKey(t *testing.T) {
function TestPutAmpUpstreamAPIKeys_PersistsAndReturns (line 195) | func TestPutAmpUpstreamAPIKeys_PersistsAndReturns(t *testing.T) {
function TestDeleteAmpUpstreamAPIKeys_ClearsAll (line 241) | func TestDeleteAmpUpstreamAPIKeys_ClearsAll(t *testing.T) {
function TestDeleteAmpUpstreamAPIKey (line 280) | func TestDeleteAmpUpstreamAPIKey(t *testing.T) {
function TestGetAmpRestrictManagementToLocalhost (line 294) | func TestGetAmpRestrictManagementToLocalhost(t *testing.T) {
function TestPutAmpRestrictManagementToLocalhost (line 317) | func TestPutAmpRestrictManagementToLocalhost(t *testing.T) {
function TestGetAmpModelMappings (line 333) | func TestGetAmpModelMappings(t *testing.T) {
function TestPutAmpModelMappings (line 360) | func TestPutAmpModelMappings(t *testing.T) {
function TestPatchAmpModelMappings (line 376) | func TestPatchAmpModelMappings(t *testing.T) {
function TestDeleteAmpModelMappings_Specific (line 392) | func TestDeleteAmpModelMappings_Specific(t *testing.T) {
function TestDeleteAmpModelMappings_All (line 408) | func TestDeleteAmpModelMappings_All(t *testing.T) {
function TestGetAmpForceModelMappings (line 422) | func TestGetAmpForceModelMappings(t *testing.T) {
function TestPutAmpForceModelMappings (line 445) | func TestPutAmpForceModelMappings(t *testing.T) {
function TestPutAmpModelMappings_VerifyState (line 461) | func TestPutAmpModelMappings_VerifyState(t *testing.T) {
function TestPatchAmpModelMappings_VerifyState (line 498) | func TestPatchAmpModelMappings_VerifyState(t *testing.T) {
function TestDeleteAmpModelMappings_VerifyState (line 540) | func TestDeleteAmpModelMappings_VerifyState(t *testing.T) {
function TestDeleteAmpModelMappings_NonExistent (line 579) | func TestDeleteAmpModelMappings_NonExistent(t *testing.T) {
function TestPutAmpModelMappings_Empty (line 608) | func TestPutAmpModelMappings_Empty(t *testing.T) {
function TestPutAmpUpstreamURL_VerifyState (line 637) | func TestPutAmpUpstreamURL_VerifyState(t *testing.T) {
function TestDeleteAmpUpstreamURL_VerifyState (line 666) | func TestDeleteAmpUpstreamURL_VerifyState(t *testing.T) {
function TestPutAmpUpstreamAPIKey_VerifyState (line 693) | func TestPutAmpUpstreamAPIKey_VerifyState(t *testing.T) {
function TestDeleteAmpUpstreamAPIKey_VerifyState (line 722) | func TestDeleteAmpUpstreamAPIKey_VerifyState(t *testing.T) {
function TestPutAmpRestrictManagementToLocalhost_VerifyState (line 749) | func TestPutAmpRestrictManagementToLocalhost_VerifyState(t *testing.T) {
function TestPutAmpForceModelMappings_VerifyState (line 778) | func TestPutAmpForceModelMappings_VerifyState(t *testing.T) {
function TestPutBoolField_EmptyObject (line 807) | func TestPutBoolField_EmptyObject(t *testing.T) {
function TestComplexMappingsWorkflow (line 823) | func TestComplexMappingsWorkflow(t *testing.T) {
function TestNilHandlerGetAmpCode (line 873) | func TestNilHandlerGetAmpCode(t *testing.T) {
function TestEmptyConfigGetAmpModelMappings (line 888) | func TestEmptyConfigGetAmpModelMappings(t *testing.T) {
FILE: test/builtin_tools_translation_test.go
function TestOpenAIToCodex_PreservesBuiltinTools (line 12) | func TestOpenAIToCodex_PreservesBuiltinTools(t *testing.T) {
function TestOpenAIResponsesToOpenAI_IgnoresBuiltinTools (line 36) | func TestOpenAIResponsesToOpenAI_IgnoresBuiltinTools(t *testing.T) {
FILE: test/thinking_conversion_test.go
type thinkingTestCase (line 29) | type thinkingTestCase struct
function TestThinkingE2EMatrix_Suffix (line 46) | func TestThinkingE2EMatrix_Suffix(t *testing.T) {
function TestThinkingE2EMatrix_Body (line 1330) | func TestThinkingE2EMatrix_Body(t *testing.T) {
function TestThinkingE2EClaudeAdaptive_Body (line 2601) | func TestThinkingE2EClaudeAdaptive_Body(t *testing.T) {
function getTestModels (line 3120) | func getTestModels() []*registry.ModelInfo {
function runThinkingTests (line 3240) | func runThinkingTests(t *testing.T, cases []thinkingTestCase) {