Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: 18TierCoder/auth2api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: AmazingAng/auth2api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 9 commits
  • 52 files changed
  • 3 contributors

Commits on Apr 9, 2026

  1. Refactor/restructure and api fixes (AmazingAng#13)

    * refactor: restructure project layout, unify streaming, fix OpenAI API parameter gaps
    CallOrRet authored Apr 9, 2026
    Configuration menu
    Copy the full SHA
    7b45925 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2026

  1. Add Claude Opus 4.7 model and alias

    Introduce support for the new Claude Opus 4.7 model across the codebase and docs. Updates include: README and README_CN to list claude-opus-4-7 and change the `opus` alias to point to it; src/server.ts to include the new model in SUPPORTED_MODELS; src/upstream/translator.ts to update the alias mapping (`opus` -> `claude-opus-4-7`) and add an explicit passthrough entry; and tests/unit.test.ts to reflect the new alias mapping and model passthrough checks. These changes add first-class support for Opus 4.7 and keep tests and documentation in sync.
    AmazingAng committed Apr 25, 2026
    Configuration menu
    Copy the full SHA
    d2beafe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8054e5d View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2026

  1. Add Codex provider & refresh/reload improvements

    Introduce first-class support for the Codex (ChatGPT) provider and a number of account/refresh management improvements. Key changes:
    
    - Add Codex OAuth flow, token refresh, and upstream codex API/models; extract planType/chatgpt account id from id_token.
    - Extend AccountManager: per-provider refresh policies (expires-lead / since-last-refresh), single-flight refresh locks, reload-from-disk (upsert) semantics, reauth cooldown for exhausted refresh tokens, reasoning token accounting, and richer snapshots (planType, reasoning token totals).
    - Callback server made configurable (port/path/timeout) to support multiple providers.
    - README and README_CN updated to document multi-provider usage, routing by model name, /admin/reload behavior, model lists, and Codex caveats.
    - Add utilities (jwt, notify-reload), new provider/provider types, tests for codex, and supporting upstream/streaming changes.
    - Small tooling tweaks: expanded .gitignore, test script and prettier target updates, and configuration entries for codex CLI headers.
    
    These changes enable using ChatGPT Plus/Pro subscriptions as an upstream (codex) while preserving robust token rotation handling and allowing hot-reload of newly-issued tokens without restarting the server.
    AmazingAng committed Apr 26, 2026
    Configuration menu
    Copy the full SHA
    411d4ae View commit details
    Browse the repository at this point in the history

Commits on May 2, 2026

  1. Add experimental Cursor provider support

    Introduce an experimental Cursor upstream provider and wiring across the codebase. Adds browser PKCE deep-link login, poll-based auth, token refresh/expiry handling, and storage for Cursor accounts (src/auth/cursor/*). Implements a Cursor upstream client and decoder (src/upstream/cursor-api.ts, responses-translator.ts) to translate Cursor streaming protocol into OpenAI Responses and Anthropic Messages formats, plus related provider plumbing (src/providers/cursor.ts) and tests (tests/cursor.test.ts, tests/responses-translator.test.ts). Update config example, README (EN/CN) and model/routing docs to document Cursor behavior, cursor-exclusive mode, and cloaking headers; adjust token storage, types, handlers, upstream streaming, and HTTP utilities to support Cursor's HTTP/2/connect+proto polling and streaming. Also add a small abort helper (src/utils/abort.ts) and an HTTP2 GET helper for reliable polling against api2.cursor.sh. The Cursor integration is flagged as reverse-engineered/experimental and includes safeguards for missing refresh tokens and transient network errors.
    AmazingAng committed May 2, 2026
    Configuration menu
    Copy the full SHA
    4823e1a View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' into feat/codex-provider

    Brings in PR AmazingAng#20 (fix(openai): improve API compat and tidy SSE framing):
    
    - translator.ts: SSE framing ("data: ...\n\n") is now produced inside the
      translator's makeChunk / [DONE] handler instead of by the caller. Drop
      the now-redundant ".map((c) => `data: ${c}\n\n`)" wrapper in
      createChatCompletionsHandler's anthropic-translation streaming path so we
      don't end up with a double "data:" prefix.
    - translator.ts: support reasoning_effort: "minimal", treat OpenAI
      "developer" role like "system", inject a system hint when the client asks
      for response_format: { type: "json_object" } (Chat) or
      text.format: { type: "json_object" } (Responses), and honor multiple
      Responses "system" items.
    - README/README_CN: keep our richer multi-provider/Codex/Cursor docs and
      per-account reload docs; absorb the new "Structured JSON output" feature
      bullet and "request statistics" wording from main.
    
    187/187 tests still green; build clean.
    
    Co-authored-by: Cursor <[email protected]>
    AmazingAng and cursoragent committed May 2, 2026
    Configuration menu
    Copy the full SHA
    585c2be View commit details
    Browse the repository at this point in the history
  3. Merge pull request AmazingAng#21 from AmazingAng/feat/codex-provider

    Add Codex provider & refresh/reload improvements
    AmazingAng authored May 2, 2026
    Configuration menu
    Copy the full SHA
    aa087c3 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2026

  1. Add per-request stats and /admin/stats endpoint

    Introduce a stats subsystem that logs each authenticated request to <auth-dir>/stats.jsonl and maintains an in-memory aggregate. Added StatsRecorder (src/stats/recorder.ts) and storage plumbing, a configurable stats.enabled flag in config, and wiring in startServer/createServer to start/stop the recorder. Server now seeds per-request stats context and uses a finish middleware to record success/failure, latency and usage; handlers call tagStatsModel/tagStatsUsage to populate model/provider/usage. Exposed aggregated snapshot via GET /admin/stats and documented the feature in README(s) and config.example.yaml. Also kept existing provider usage recording but now forwards usage into the stats recorder.
    AmazingAng committed May 9, 2026
    Configuration menu
    Copy the full SHA
    840fa10 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2026

  1. Add codex responses compact support

    Adds a standalone `/responses/compact` flow for Codex, including route aliases, request normalization, session seeding, and usage tracking. Also expands Anthropic model aliases and compact beta inference, and makes tool-argument parsing tolerant of malformed JSON.
    AmazingAng committed Jul 1, 2026
    Configuration menu
    Copy the full SHA
    a34c011 View commit details
    Browse the repository at this point in the history
Loading