Commit Graph
100 Commits
Author SHA1 Message Date
hkfires 166fa9e2e6 fix(gemini): parse stream usage from JSON, skip thoughtSignature 2025-11-22 16:07:12 +08:00
hkfires 88e566281e fix(gemini): filter SSE usage metadata in streams 2025-11-22 15:53:36 +08:00
hkfires d32bb9db6b fix(runtime): treat non-empty finishReason as terminal 2025-11-22 15:39:46 +08:00
hkfires 8356b35320 fix(executor): expire stop chunks without usage metadata 2025-11-22 15:27:47 +08:00
hkfires 19a048879c feat(runtime): track antigravity usage and token counts 2025-11-22 14:04:28 +08:00
hkfires 1061354b2f fix: handle empty and non-JSON SSE chunks safely 2025-11-22 13:49:23 +08:00
hkfires 46b4110ff3 fix: preserve SSE usage metadata-only trailing chunks 2025-11-22 13:25:25 +08:00
hkfires c29931e093 fix(translator): ignore empty JSON chunks in OpenAI responses 2025-11-22 13:09:16 +08:00
hkfires b05cfd9f84 fix(translator): include empty text chunks in responses 2025-11-22 13:03:50 +08:00
hkfires 8ce22b8403 fix(sse): preserve usage metadata for stop chunks 2025-11-22 12:50:23 +08:00
hkfires dc8d3201e1 feat(translator): support image size and googleSearch tools 2025-11-22 10:36:52 +08:00
hkfires abc2465b29 fix(gemini-cli): ignore thoughtSignature and empty parts 2025-11-21 17:12:56 +08:00
hkfires 4ba5b43d82 feat(executor): share SSE usage filtering across streams 2025-11-21 16:51:05 +08:00
hkfires 27faf718a3 fix(auth): use fixed antigravity callback port 51121 2025-11-21 13:56:33 +08:00
hkfires 3f4f8b3b2d feat(iflow): add cookie-based authentication endpoint 2025-11-20 18:23:43 +08:00
hkfires b285b07986 fix(iflow): adjust auth filename email sanitization 2025-11-19 19:50:06 +08:00
hkfires 8a33f3ef69 fix: detect HTML error bodies without text/html content type 2025-11-19 14:45:33 +08:00
hkfires b52a5cc066 feat(auth): add iFlow cookie-based authentication support 2025-11-18 22:35:35 +08:00
hkfires 1ba057112a fix: use underscore suffix in short name mapping
Replace the "~<n>" suffix with "_<n>" when generating unique short names in codex translators (Claude, Gemini, OpenAI chat).
This avoids using a special character in identifiers, improving compatibility with downstream APIs while preserving length constraints.
2025-11-18 16:59:25 +08:00
hkfires 43095de162 fix(management): exclude disabled runtime-only auths from file entries 2025-11-10 08:32:42 +08:00
hkfires 51d2766d5c fix(management): sanitize keys and normalize headers 2025-11-09 12:13:02 +08:00
hkfires a00ba77604 refactor(config): rename SyncGeminiKeys; use Sanitize* methods 2025-11-09 08:29:47 +08:00
hkfires cfb9cb8951 feat(config): support HTTP headers across providers 2025-11-08 20:52:05 +08:00
hkfires 1f6a384c9a fix(api): omit auth file entries lacking path unless runtime-only 2025-11-07 19:15:54 +08:00
hkfires c9fc033cf5 feat(management): support in-memory auth listing with disk fallback 2025-11-07 19:04:54 +08:00
hkfires d60040b222 fix(translator): accept camelCase thinking config in OpenAI→Gemini 2025-11-07 16:45:31 +08:00
hkfires 2021ae3891 fix(config): skip persisting empty API key and compat entries 2025-10-31 15:56:47 +08:00
hkfires 4883349795 Update doc 2025-10-31 15:22:09 +08:00
hkfires 5c65938113 fix(config): stabilize YAML sequence merges by reordering items 2025-10-31 15:21:58 +08:00
hkfires 16be3f0a12 fix(config): dedupe and normalize Gemini keys and headers 2025-10-31 13:20:10 +08:00
hkfires 7c1c4ee60b feat(gemini): add Gemini API key endpoints 2025-10-31 11:09:28 +08:00
hkfires a53c84d0d1 feat(gemini): apply default safety settings across request translators 2025-10-31 08:22:16 +08:00
hkfires a517290726 refactor(executor): summarize API error bodies of html in debug logs 2025-10-31 06:58:38 +08:00
hkfires 24446a4dc4 feat(cliproxy): skip persisting runtime-only websocket auths 2025-10-29 21:49:35 +08:00
hkfires 475f473dab docs: add AI Studio setup 2025-10-29 21:10:14 +08:00
hkfires 1bbbd16df6 chore(logging): clarify 429 rate-limit retries in Gemini executor 2025-10-29 19:19:18 +08:00
hkfires 5cb378256b feat(gemini-translators): set include_thoughts when mapping thinking 2025-10-29 19:19:18 +08:00
hkfires 3ac5f05e8c feat(gemini): prefer official reasoning fields, add extra_body(cherry studio) fallback 2025-10-29 19:19:18 +08:00
hkfires 58d30369b4 fix(gemini-cli): correctly strip/normalize thinking config by model 2025-10-29 19:19:18 +08:00
hkfires 7dd93a4a25 fix(executor): only apply thinking config to supported models 2025-10-29 19:19:17 +08:00
hkfires 2a3ee8d0e3 fix(translators): normalize thinking budgets 2025-10-29 19:19:17 +08:00
hkfires 41577bce07 feat(claude): map Anthropic 'thinking' to Gemini thinkingBudget 2025-10-29 19:19:17 +08:00
hkfires 3d7aca22c0 feat(registry): add thinking budget support; populate Gemini models 2025-10-29 19:19:17 +08:00
hkfires 680b3f5010 fix(translator): avoid default thinkingConfig in Gemini requests 2025-10-29 19:19:17 +08:00
hkfires c99d0dfb33 fix(aistudio): remove no-op executor unregister on WS disconnect 2025-10-28 19:51:05 +08:00
hkfires 663b9b35ab fix(executor): pass authID to relay instead of provider 2025-10-28 19:28:26 +08:00
hkfires 5dced4c0a6 feat(registry): unify Gemini models and add AI Studio set 2025-10-28 19:00:25 +08:00
hkfires e370f86f63 fix(gemini-executor): uppercase responseModalities 2025-10-26 21:26:15 +08:00
hkfires 7f266aa19e fix(aistudio): ensure colon-spaced JSON in responses 2025-10-26 20:21:45 +08:00
hkfires f3f31274e8 refactor(wsrelay): rename RoundTrip to NonStream 2025-10-26 20:01:46 +08:00
hkfires 7061cd6058 fix(gemini): map responseModalities to uppercase IMAGE/TEXT 2025-10-26 19:35:22 +08:00
hkfires 7459c2c81a fix(aistudio): remove generationConfig and tools when action is countTokens 2025-10-26 16:28:20 +08:00
hkfires 359b8de44e feat(ws): add WebSocket auth 2025-10-26 07:46:04 +08:00
hkfires ea6065f1b1 fix(aistudio): strip usage metadata from non-final stream chunks 2025-10-26 07:46:04 +08:00
hkfires 8aaed4cf09 feat(aistudio): support non-streaming responses 2025-10-26 07:46:04 +08:00
hkfires c32e013605 feat(aistudio): track Gemini usage and improve stream errors 2025-10-26 07:46:04 +08:00
hkfires 3839d93ba0 feat: add websocket routing and executor unregister API
- Introduce Server.AttachWebsocketRoute(path, handler) to mount websocket
  upgrade handlers on the Gin engine.
- Track registered WS paths via wsRoutes with wsRouteMu to prevent
  duplicate registrations; initialize in NewServer and import sync.
- Add Manager.UnregisterExecutor(provider) for clean executor lifecycle
  management.
- Add github.com/gorilla/websocket v1.5.3 dependency and update go.sum.

Motivation: enable services to expose WS endpoints through the core server
and allow removing auth executors dynamically while avoiding duplicate
route setup. No breaking changes.
2025-10-26 07:46:03 +08:00
hkfires f8dcd707a6 feat(mgmt): support YAML config retrieval and updates via /config.yaml 2025-10-19 21:56:29 +08:00
hkfires 4504ba5329 feat(iflow): add masked token logs; increase refresh lead to 24h 2025-10-19 10:56:29 +08:00
hkfires d16599fa1d feat: prefer util.WritablePath() for logs and local storage 2025-10-19 10:19:55 +08:00
hkfires 9f45806106 feat(logging): centralize sensitive header masking 2025-10-18 17:16:00 +08:00
hkfires 9319602812 UPDATE README 2025-10-16 22:57:44 +08:00
Chén MùandGitHub 8e95c5e0a8 Merge pull request #134 from router-for-me/hg
feat(managementasset): add MANAGEMENT_STATIC_PATH override
2025-10-16 22:25:05 +08:00
hkfires 93f0e65cef docs: document MANAGEMENT_STATIC_PATH for management.html location 2025-10-16 22:15:17 +08:00
hkfires c75e524fe5 feat(managementasset): add MANAGEMENT_STATIC_PATH override 2025-10-16 21:52:59 +08:00
Chén MùandGitHub f58d0faf8c Merge pull request #130 from router-for-me/log
feat(management): add log retrieval and cleanup endpoints
2025-10-16 12:39:06 +08:00
hkfires df3b00621a fix(logs): ignore ENOENT when truncating default log file 2025-10-16 12:35:29 +08:00
hkfires 72cb2689e8 feat(management): add log retrieval and cleanup endpoints 2025-10-16 11:55:58 +08:00
hkfires 84fa497169 fix(server): snapshot config with YAML to handle in-place mutations
- Add oldConfigYaml to store previous config snapshot
- Rebuild oldCfg from YAML in UpdateClients for reliable change detection
- Initialize and refresh snapshot on startup and after updates
- Prevents change detection bugs when Management API mutates cfg in place
- Import gopkg.in/yaml.v3
2025-10-15 18:26:23 +08:00
hkfires 9ef76dcc61 Add Object Storage 2025-10-15 11:47:35 +08:00
hkfires 1cd275f4c1 Merge branch 'dev' 2025-10-14 15:47:39 +08:00
hkfires 4bc1ed6031 feat(config): use block style for YAML maps/lists; keep [] for empty 2025-10-14 15:43:58 +08:00
hkfires 78989d6c0d feat(store)!: Lock AuthDir when use gitstore/pgstore 2025-10-14 15:43:58 +08:00
hkfires d6aa1e5ba0 fix(postgresstore): normalize config line endings for DB/disk writes 2025-10-14 15:43:58 +08:00
hkfires 50c1c50dbd docs: document PostgreSQL-backed config/token store 2025-10-14 15:43:58 +08:00
hkfires 5123cfd47e feat(store): add PostgreSQL-backed config store with env selection 2025-10-14 15:43:58 +08:00
Chén MùandGitHub 9072accc43 Merge pull request #118 from router-for-me/config
feat(config): use block style for YAML maps/lists
2025-10-14 13:44:00 +08:00
hkfires 0d8134aabe feat(config): use block style for YAML maps/lists; keep [] for empty 2025-10-14 13:17:04 +08:00
Chén MùandGitHub 4fdbdf7925 Merge pull request #117 from router-for-me/pg
feat(store): add PostgreSQL-backed config store with env selection
2025-10-14 11:28:19 +08:00
hkfires 50c84485c3 feat(store)!: Lock AuthDir when use gitstore/pgstore 2025-10-14 10:46:45 +08:00
hkfires f335aeeedb fix(postgresstore): normalize config line endings for DB/disk writes 2025-10-14 08:38:15 +08:00
hkfires 61f6a612e3 docs: document PostgreSQL-backed config/token store 2025-10-13 22:31:01 +08:00
hkfires 42087d5387 feat(store): add PostgreSQL-backed config store with env selection 2025-10-13 21:05:43 +08:00
hkfires 39abde2413 refactor(watcher): remove redundant quota-exceeded change logs 2025-10-13 14:02:55 +08:00
hkfires 0aa8706ef7 feat(config): Treat empty BaseURL for Codex keys as deletion 2025-10-13 13:48:27 +08:00
hkfires 5fd4a8b974 feat(config): Remove OpenAI providers with empty BaseURL 2025-10-13 13:48:27 +08:00
hkfires 06e6f0a5f2 refactor(watcher): Extract config change logging to new function 2025-10-13 13:48:27 +08:00
hkfires b5ad978d44 feat(managementasset): Authenticate GitHub API requests 2025-10-12 21:21:51 +08:00
hkfires 4c033b3af7 feat(config): disable logging and usage stats by default 2025-10-11 22:11:08 +08:00
hkfires 843a81f68d fix(server): Handle empty/invalid config in cloud deploy mode 2025-10-11 22:07:08 +08:00
hkfires fc6aa8ef77 feat(config): Gracefully handle empty or invalid optional config 2025-10-11 20:49:15 +08:00
hkfires c3f88126e6 refactor(provider): remove Gemini Web cookie-based support 2025-10-11 12:56:07 +08:00
hkfires b895018ff5 refactor(provider): remove Gemini Web cookie-based provider 2025-10-11 12:53:03 +08:00
hkfires 78738ca3f0 fix(config): treat directory as absent for optional config in cloud deploy mode 2025-10-10 19:40:02 +08:00
hkfires ac01c74c02 feat(server): Add cloud deploy mode 2025-10-10 18:52:43 +08:00
hkfires 01be94a0de feat(translator): Map OpenAI modalities to Gemini responseModalities 2025-10-09 19:38:07 +08:00
hkfires d1933075c3 Revert "feat(translator): Pass through imageConfig" 2025-10-09 16:35:08 +08:00
hkfires a602ae859b feat(translator): Add support for openrouter image_config 2025-10-09 15:47:06 +08:00
hkfires c5d7137d66 feat(translator): Pass through imageConfig 2025-10-09 13:50:43 +08:00
hkfires 514f5a8ad4 feat(cliproxy): Rebind auth executors on config change 2025-10-07 21:23:21 +08:00