Versions in this module Expand all Collapse all v7 v7.0.1 May 10, 2026 v7.0.0 May 9, 2026 Changes in this version + const ClaudeCodeDoingTasks + const ClaudeCodeIntro + const ClaudeCodeOutputEfficiency + const ClaudeCodeSystem + const ClaudeCodeSystemReminderSection + const ClaudeCodeToneAndStyle + var ClaudeDeviceProfileBeforeCandidateStore func(ClaudeDeviceProfile) + func APIKeyFromContext(ctx context.Context) string + func AppendAPIResponseChunk(ctx context.Context, cfg *config.Config, chunk []byte) + func AppendAPIWebsocketResponse(ctx context.Context, cfg *config.Config, payload []byte) + func ApplyClaudeDeviceProfileHeaders(r *http.Request, profile ClaudeDeviceProfile) + func ApplyClaudeLegacyDeviceHeaders(r *http.Request, ginHeaders http.Header, cfg *config.Config) + func ApplyPayloadConfigWithRoot(cfg *config.Config, model, protocol, root string, payload, original []byte, ...) []byte + func AugmentClaudeBuiltinToolRegistry(body []byte, registry map[string]bool) map[string]bool + func BuildOpenAIUsageJSON(count int64) []byte + func CachedSessionID(apiKey string) string + func CachedUserID(apiKey string) string + func ClaudeDeviceProfileStabilizationEnabled(cfg *config.Config) bool + func CountOpenAIChatTokens(enc tokenizer.Codec, payload []byte) (int64, error) + func CreditsUsed(ctx context.Context) bool + func DefaultClaudeVersion(cfg *config.Config) string + func FilterSSEUsageMetadata(payload []byte) []byte + func GenerateFakeUserID() string + func IsValidUserID(userID string) bool + func JSONPayload(line []byte) []byte + func LogWithRequestID(ctx context.Context) *log.Entry + func MapStainlessArch() string + func MapStainlessOS() string + func MarkCreditsUsed(ctx context.Context) + func NewProxyAwareHTTPClient(ctx context.Context, cfg *config.Config, auth *cliproxyauth.Auth, ...) *http.Client + func NewUtlsHTTPClient(cfg *config.Config, auth *cliproxyauth.Auth, timeout time.Duration) *http.Client + func ObfuscateSensitiveWords(payload []byte, matcher *SensitiveWordMatcher) []byte + func ParseAntigravityStreamUsage(line []byte) (usage.Detail, bool) + func ParseAntigravityUsage(data []byte) usage.Detail + func ParseClaudeStreamUsage(line []byte) (usage.Detail, bool) + func ParseClaudeUsage(data []byte) usage.Detail + func ParseCodexImageToolUsage(data []byte) (usage.Detail, bool) + func ParseCodexUsage(data []byte) (usage.Detail, bool) + func ParseGeminiCLIStreamUsage(line []byte) (usage.Detail, bool) + func ParseGeminiCLIUsage(data []byte) usage.Detail + func ParseGeminiStreamUsage(line []byte) (usage.Detail, bool) + func ParseGeminiUsage(data []byte) usage.Detail + func ParseOpenAIStreamUsage(line []byte) (usage.Detail, bool) + func ParseOpenAIUsage(data []byte) usage.Detail + func PayloadRequestPath(opts cliproxyexecutor.Options) string + func PayloadRequestedModel(opts cliproxyexecutor.Options, fallback string) string + func RecordAPIRequest(ctx context.Context, cfg *config.Config, info UpstreamRequestLog) + func RecordAPIResponseError(ctx context.Context, cfg *config.Config, err error) + func RecordAPIResponseMetadata(ctx context.Context, cfg *config.Config, status int, headers http.Header) + func RecordAPIWebsocketError(ctx context.Context, cfg *config.Config, stage string, err error) + func RecordAPIWebsocketHandshake(ctx context.Context, cfg *config.Config, status int, headers http.Header) + func RecordAPIWebsocketRequest(ctx context.Context, cfg *config.Config, info UpstreamRequestLog) + func RecordAPIWebsocketUpgradeRejection(ctx context.Context, cfg *config.Config, info UpstreamRequestLog, status int, ...) + func RefreshAuthViaHome(ctx context.Context, cfg *config.Config, auth *cliproxyauth.Auth) (*cliproxyauth.Auth, bool, error) + func ResetClaudeDeviceProfileCache() + func SetCodexCache(key string, cache CodexCache) + func ShouldCloak(cloakMode string, userAgent string) bool + func StripUsageMetadataFromJSON(rawJSON []byte) ([]byte, bool) + func StripVertexOpenAIResponsesToolCallIDs(payload []byte, sourceFormat string) []byte + func SummarizeErrorBody(contentType string, body []byte) string + func TokenizerForModel(model string) (tokenizer.Codec, error) + func WebsocketUpgradeRequestURL(rawURL string) string + type ClaudeDeviceProfile struct + Arch string + OS string + PackageVersion string + RuntimeVersion string + UserAgent string + func ResolveClaudeDeviceProfile(auth *cliproxyauth.Auth, apiKey string, headers http.Header, ...) ClaudeDeviceProfile + type CodexCache struct + Expire time.Time + ID string + func GetCodexCache(key string) (CodexCache, bool) + type SensitiveWordMatcher struct + func BuildSensitiveWordMatcher(words []string) *SensitiveWordMatcher + type UpstreamRequestLog struct + AuthID string + AuthLabel string + AuthType string + AuthValue string + Body []byte + Headers http.Header + Method string + Provider string + URL string + type UsageReporter struct + func NewUsageReporter(ctx context.Context, provider, model string, auth *cliproxyauth.Auth) *UsageReporter + func (r *UsageReporter) EnsurePublished(ctx context.Context) + func (r *UsageReporter) Publish(ctx context.Context, detail usage.Detail) + func (r *UsageReporter) PublishAdditionalModel(ctx context.Context, model string, detail usage.Detail) + func (r *UsageReporter) PublishFailure(ctx context.Context, errs ...error) + func (r *UsageReporter) TrackFailure(ctx context.Context, errPtr *error) Other modules containing this package github.com/router-for-me/CLIProxyAPI/v6