Skip to content

[refactor/base-token-storage] style: gofmt import ordering in utls_transport.go#895

Merged
KooshaPari merged 6 commits intomainfrom
refactor/base-token-storage
Mar 25, 2026
Merged

[refactor/base-token-storage] style: gofmt import ordering in utls_transport.go#895
KooshaPari merged 6 commits intomainfrom
refactor/base-token-storage

Conversation

@KooshaPari
Copy link
Owner

Summary

Auto-generated PR for branch refactor/base-token-storage.

Test plan

N/A (Auto-generated)

KooshaPari and others added 5 commits March 1, 2026 06:38
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Add pkg/llmproxy/auth/base/token_storage.go with BaseTokenStorage, which
centralises the Save/Load/Clear file-I/O logic that was duplicated across
every auth provider.  Key design points:

- Save() uses an atomic write (temp file + os.Rename) to prevent partial reads
- Load() and Clear() are idempotent helpers for callers that load/clear credentials
- GetAccessToken/RefreshToken/Email/Type accessor methods satisfy the common interface
- FilePath field is runtime-only (json:"-") so it never bleeds into persisted JSON

Migrate claude, copilot, gemini, codex, kimi, kilo, and iflow providers to
embed *base.BaseTokenStorage.  Each provider's SaveTokenToFile() now delegates
to base.Save() after setting its Type field.  Struct literals in *_auth.go
callers updated to use the nested BaseTokenStorage initialiser.

Skipped: qwen (already has own helper), vertex (service-account JSON format),
kiro (custom symlink guards), empty (no-op), antigravity/synthesizer/diff
(no token storage).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link

coderabbitai bot commented Mar 25, 2026

Warning

Rate limit exceeded

@KooshaPari has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d1d43e6a-1d06-4664-a7e0-909ea394982a

📥 Commits

Reviewing files that changed from the base of the PR and between 6b8ea89 and 4bfdec8.

📒 Files selected for processing (17)
  • .github/workflows/lint-test.yml
  • .gitignore
  • pkg/llmproxy/auth/base/token_storage.go
  • pkg/llmproxy/auth/claude/anthropic_auth.go
  • pkg/llmproxy/auth/claude/token.go
  • pkg/llmproxy/auth/claude/utls_transport.go
  • pkg/llmproxy/auth/codex/openai_auth.go
  • pkg/llmproxy/auth/codex/token.go
  • pkg/llmproxy/auth/copilot/copilot_auth.go
  • pkg/llmproxy/auth/copilot/token.go
  • pkg/llmproxy/auth/gemini/gemini_auth.go
  • pkg/llmproxy/auth/gemini/gemini_token.go
  • pkg/llmproxy/auth/iflow/iflow_auth.go
  • pkg/llmproxy/auth/iflow/iflow_token.go
  • pkg/llmproxy/auth/kilo/kilo_token.go
  • pkg/llmproxy/auth/kimi/kimi.go
  • pkg/llmproxy/auth/kimi/token.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/base-token-storage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@KooshaPari KooshaPari merged commit 49c275a into main Mar 25, 2026
13 of 18 checks passed
@KooshaPari KooshaPari deleted the refactor/base-token-storage branch March 25, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant