Commit Graph

2384 Commits

Author SHA1 Message Date
Luis Pater
054d0dee1d Merge pull request #3201 from murasame612/docs/add-cliproxy-pool-watch
docs: add CLIProxy Pool Watch project
2026-05-03 21:37:36 +08:00
ziwu
5fc6f662e1 docs: add CLIProxy Pool Watch project 2026-05-03 18:25:11 +08:00
Luis Pater
593995a404 Merge pull request #3197 from VjayC/dev
docs: update Subtitle Translator project description
2026-05-03 14:23:44 +08:00
Vijay Chimmi
101b59cfe8 docs: update Subtitle Translator project description 2026-05-02 17:37:38 -07:00
Luis Pater
56df36895a feat: add configurable retention period for Redis usage queue
- Introduced `redis-usage-queue-retention-seconds` config parameter with a default of 60 seconds and a max of 3600 seconds.
- Updated logic in `redisqueue` to honor configurable retention periods for enqueued usage data.
- Modified config validation and initialization to support and enforce retention limits.
- Enhanced change tracking in `config_diff` to detect updates to this parameter.
v6.10.1
2026-05-02 20:43:16 +08:00
Luis Pater
85124f098b Merge pull request #3194 from daishuge/codex/add-daishuge-cpa-port-20260502
docs: add Playful Proxy API Panel
2026-05-02 17:43:02 +08:00
daishuge
2efa56dbb8 docs: add Playful Proxy API Panel 2026-05-02 17:03:11 +08:00
Luis Pater
79579c34bf docs: update README to consolidate and clarify CPA Usage Keeper details
- Moved CPA Usage Keeper from "CLI tools" to a dedicated "Usage Statistics" section.
- Added details on its functionality, periodic data sync, SQLite storage, and built-in dashboard.
- Applied updates across English, Chinese, and Japanese README files for consistency.
2026-05-02 13:37:42 +08:00
Luis Pater
18bb9c315f chore: remove usage tracking and logging functionality
- Deleted the `LoggerPlugin` along with associated usage tracking and in-memory statistics logic.
- Removed all related tests (`logger_plugin_test.go`, `usage_tab_test.go`) and external-facing handler (`usage.go`) for usage statistics export/import.
- Cleaned up TUI integration by deleting `usage_tab.go`.
v6.10.0
2026-05-02 04:50:58 +08:00
Luis Pater
b8bba053fc feat: add tracking for auth request success and failure counts
- Introduced `Success` and `Failed` fields in auth records to track request outcomes.
- Updated `/v0/management/auth-files` and `/v0/management/api-key-usage` responses to include success and failure counts.
- Enhanced tests to validate tracking logic and API responses.
v6.9.49
2026-05-02 03:40:00 +08:00
Luis Pater
8c2f1a80d3 feat: enhance API key usage grouping with base URL inclusion
- Updated `GetAPIKeyUsage` to group API key usage by "base_url|api_key" composite keys.
- Adjusted logic to handle `base_url` extraction from auth attributes.
- Revised unit tests to validate "base_url|api_key" grouping behavior.
v6.9.48
2026-05-02 02:20:49 +08:00
Luis Pater
e37f3be0bf chore: update .goreleaser.yml to include custom archive naming with arch override logic 2026-05-02 00:09:08 +08:00
Luis Pater
b0dc9df887 feat: add API key usage endpoint with provider and key grouping
- Implemented `GetAPIKeyUsage` to expose recent request data grouped by provider and API key.
- Added supporting function `mergeRecentRequestBuckets` for bucket aggregation.
- Registered new endpoint `/v0/management/api-key-usage` in the management API.
- Included extensive unit tests for provider and key-based grouping validation.
- Updated `formatRecentRequestBucketLabel` to support configurable bucket duration.
v6.9.47
2026-05-01 23:34:18 +08:00
Luis Pater
6187919000 feat: add support for recent request tracking in auth records
- Implemented `RecentRequestsSnapshot` in `Auth` to capture bucketed recent request data.
- Added new fields and methods to `Auth` for tracking request success and failure counts over time.
- Updated `/v0/management/auth-files` response to include recent request data for each auth record.
- Introduced unit tests to validate request tracking and snapshot generation logic.
v6.9.46
2026-05-01 22:55:22 +08:00
Luis Pater
4035abc0cd refactor(logging): replace gin-specific context handling with generic context-based request metadata utilities
- Introduced reusable utilities in `requestmeta` to manage endpoint and response status in request contexts.
- Refactored plugins and handlers to use context-based metadata, removing direct dependency on `gin`.
- Updated tests to validate new context utilities and replaced `gin`-based context handling.

Fixed: #3166
2026-04-30 23:36:07 +08:00
Luis Pater
8b286e8fb3 Merge pull request #3163 from C4AL/docs/add-codexclipplus-ecosystem
docs: add CodexCliPlus to README ecosystem list
2026-04-30 20:42:32 +08:00
C4AL
aa70d13f60 docs: add CodexCliPlus to README ecosystem list 2026-04-30 20:36:37 +08:00
Luis Pater
6ba7c810a7 feat: apply image_generation filtering before payload rules
- Updated `ApplyPayloadConfigWithRoot` to prioritize `disable-image-generation` filtering before applying payload rules.
- Ensured payload overrides can explicitly re-enable `image_generation` when required.
- Added unit tests to validate `image_generation` restoration through overrides.
v6.9.45
2026-04-30 12:42:08 +08:00
Luis Pater
f56a19e5b8 feat: add tri-state support for disable-image-generation configuration
- Introduced `DisableImageGenerationMode` with support for `false`, `true`, and `chat` values.
- Updated payload handling to preserve `image_generation` on images endpoints when `chat` mode is enabled.
- Modified OpenAI image handlers (`ImagesGenerations`, `ImagesEdits`) to respect tri-state logic.
- Added unit tests for `DisableImageGenerationMode` behavior and endpoint-specific handling.
- Enhanced configuration diff logging to support `DisableImageGenerationMode`.
v6.9.44
2026-04-30 12:10:27 +08:00
Luis Pater
46018417ad feat: remove tool_choice for image_generation when disabled
- Added logic to remove `tool_choice` entries of type `image_generation` from payloads when `disable-image-generation` is enabled.
- Updated `ApplyPayloadConfigWithRoot` to handle new removal logic.
- Added unit tests to verify `tool_choice` removal behavior.
2026-04-30 08:24:14 +08:00
Luis Pater
e3e60f914b feat: support disabling image generation globally
- Added `disable-image-generation` configuration flag to disable the `image_generation` tool globally.
- Updated payload handling to remove `image_generation` tools from request payload arrays when the flag is enabled.
- Modified OpenAI image handlers (`ImagesGenerations`, `ImagesEdits`) to return 404 when the feature is disabled.
- Enhanced configuration diff logging to track changes for the `disable-image-generation` flag.
- Added accompanying unit tests for the new feature in payload helpers and image handler logic.
v6.9.43
2026-04-30 03:42:27 +08:00
Luis Pater
359ec30d0c chore(docs): remove LingtrueAPI sponsorship section from README files 2026-04-29 23:13:12 +08:00
Luis Pater
a1f0ed9575 Merge pull request #3071 from sususu98/fix/antigravity-credits-log
Mark Antigravity credits requests in access logs
v6.9.42
2026-04-29 22:56:41 +08:00
Luis Pater
b3b92f334e Merge pull request #3125 from sususu98/fix/gemini-cli-usage-metadata-variants
fix: parse gemini cli usage metadata variants
2026-04-29 22:56:14 +08:00
Luis Pater
2c1539ead7 Merge pull request #3133 from sususu98/optimize/claude-codex-translator
fix: align claude codex translation
2026-04-29 22:55:37 +08:00
sususu98
0d107dd566 fix: respect declared claude web search tool names 2026-04-29 19:24:53 +08:00
sususu98
1c0c426b85 fix: align claude codex translation 2026-04-29 18:47:03 +08:00
sususu98
4982512da2 fix: parse gemini cli usage metadata variants 2026-04-29 13:10:53 +08:00
Luis Pater
2ea8f77efb feat(models): add GPT-5.5 to the registry with support for advanced tasks 2026-04-29 09:49:26 +08:00
Luis Pater
f95ab4cdf1 Merge pull request #3089 from XYenon/feat/session-affinity
feat: support Codex/PI session headers for session affinity
2026-04-28 23:54:16 +08:00
sususu98
c4965befe7 Merge pull request #3117 from sususu98/fix/restore-antigravity-ua-handling
fix: restore Antigravity user agent handling
v6.9.41
2026-04-28 19:07:05 +08:00
sususu98
0e1235122e fix antigravity client agent headers 2026-04-28 19:04:40 +08:00
sususu98
e78d45acc9 fix antigravity user agent handling 2026-04-28 19:04:40 +08:00
sususu98
b34f3be13e Merge pull request #3114 from Xbang0222/fix/antigravity-credits-ua
fix(antigravity): 使用真实 antigravity UA 查询积分余额
2026-04-28 19:03:21 +08:00
Luis Pater
9fb6a49260 test(api): add validation for unsupported models in OpenAI image handlers
- Introduced tests to ensure unsupported models are rejected in `/images/generations` and `/images/edits`.
- Added `isSupportedImagesModel` and `rejectUnsupportedImagesModel` functions for consistent model validation.
- Enhanced image handler logic to apply validation checks for model compatibility.
2026-04-28 17:19:12 +08:00
xbang
a992dee4e8 fix(antigravity): use real antigravity UA when polling credits balance
The loadCodeAssist polling call hardcoded the User-Agent to
google-api-nodejs-client/9.15.1. Google Cloud Code returns the
paidTier object WITHOUT the availableCredits array for that UA,
so updateAntigravityCreditsBalance always saw "no credits", set the
hint to Available=false for every Google One AI Ultra account, and
the conductor-level credits fallback could never find a candidate.

Switching to resolveUserAgent(auth) (the same UA used for
streamGenerateContent / generateContent) makes the response include
availableCredits, so the credits hint is populated correctly and the
fallback can actually inject enabledCreditTypes:["GOOGLE_ONE_AI"]
when free tier is exhausted.
2026-04-28 16:21:15 +08:00
XYenon
3ac39dcc7d feat: support Codex/PI session headers for session affinity
Amp-Thread-ID: https://ampcode.com/threads/T-019dce25-c070-773a-ac52-11c541220b30
Co-authored-by: Amp <amp@ampcode.com>
2026-04-27 17:10:50 +08:00
Luis Pater
34027da7f1 Merge pull request #3088 from sususu98/codex-claude-reasoning-signature
Preserve Codex reasoning signatures for Claude
v6.9.40
2026-04-27 16:59:11 +08:00
sususu
c523101439 Preserve Codex reasoning signatures for Claude 2026-04-27 16:51:35 +08:00
Luis Pater
d85e13b044 fix(codex): include content field in reasoning item initialization 2026-04-27 16:41:23 +08:00
Luis Pater
01e16a8509 feat(codex): handle thinking-signature conversion for reasoning content
- Implemented `appendReasoningContent` to support processing of `thinking` signature and text as reasoning input.
- Added test cases to validate reasoning content conversion with and without text.
2026-04-27 16:31:26 +08:00
Luis Pater
04a336f7df fix(usage_helpers): skip zero-token usage in additional model records
- Added `buildAdditionalModelRecord` to filter out zero-token usage details.
- Introduced `hasNonZeroTokenUsage` helper function for token usage validation.
- Updated tests to cover scenarios for zero and non-zero token usage.
2026-04-27 10:56:22 +08:00
Luis Pater
a325533f20 Merge pull request #2972 from XYenon/feat/amp-thread-id
feat: support X-Amp-Thread-Id for session affinity
2026-04-26 23:30:12 +08:00
sususu98
6fc23568df logging: mark antigravity credits requests 2026-04-26 23:04:27 +08:00
Luis Pater
736ae61e4a Merge pull request #3051 from philipbankier/fix/gpt55-free-tier-test
fix(test): remove free tier from GPT-5.5 inclusion test
v6.9.39
2026-04-26 22:35:59 +08:00
Luis Pater
c5bea6f6f8 Merge pull request #3020 from Matthias319/fix/codex-error-classification
fix(codex): classify context, thinking-signature, previous-response, and auth failures
2026-04-26 22:26:40 +08:00
Luis Pater
c7b28ba058 feat(executor): add support for Codex image generation tool usage tracking
- Introduced `publishCodexImageToolUsage` to report image generation tool metrics.
- Updated executor logic to handle image generation tool events and defaults.
- Added parsing logic for `image_gen` tool usage details in `helps/usage_helpers.go`.
- Updated `UsageReporter` for additional model-specific usage publishing.
- Refactored usage detail normalizations.

Closes: #3063
2026-04-26 22:19:03 +08:00
Luis Pater
38573050aa feat(config): add support for disabling OpenAI compatibility providers
- Introduced a `Disabled` flag to OpenAI compatibility configurations.
- Updated routing, auth selection, and API handling logic to respect the `Disabled` state.
- Extended relevant APIs, YAML configurations, and data structures to include the `Disabled` field.
- Adjusted all relevant loops and filters to skip disabled providers.

Closes: #3060 #3059 #2977
2026-04-26 21:49:36 +08:00
philipbankier
32ef1588e8 fix(test): remove free tier from GPT-5.5 inclusion test
GPT-5.5 was correctly removed from codex-free tier in 7b89583c
(since free accounts cannot access it), but the test was not updated
to reflect this. This caused TestCodexStaticModelsIncludeGPT55 to
fail on the free subtest.

Changes:
- Remove free tier from GPT-5.5 inclusion test
- Add new TestCodexFreeModelsExcludeGPT55 to explicitly verify
  that free tier does NOT include GPT-5.5
2026-04-25 22:11:08 -04:00
Luis Pater
0a7c6b0a4a feat(api): enhance model assignment logic in image handlers
- Updated `buildImagesResponsesRequest` to derive `model` dynamically based on `toolJSON`.
- Adjusted streaming execution to handle dynamic model resolution across multiple contexts.

Closes: #2965
2026-04-26 03:24:43 +08:00