Commit Graph
65 Commits
Author SHA1 Message Date
LTbinglingfeng 21c2abfe64 refactor(providers): trim provider field allowlists to kebab-case
The backend emits provider config with kebab-case JSON tags only
(internal/config/config.go: ClaudeKey/CodexKey/GeminiKey/OpenAICompatibility,
internal/api/handlers/management/config_auth_index.go for auth-index).
The camelCase / snake_case entries in PROVIDER_KEY_FIELDS,
OPENAI_PROVIDER_FIELDS, MODEL_ALIAS_FIELDS, API_KEY_ENTRY_FIELDS,
CLOAK_FIELDS, RESPONSE_ONLY_FIELDS were dead — same for the identity
helpers and the apiKeyEntries fallback in mergeOpenAIProviderPayload.
2026-05-28 00:35:23 +08:00
LTbinglingfeng 12dfd73dc8 refactor(transformers): drop kebab/camel/snake aliases in /config parsing
The backend always serializes config fields with kebab-case JSON tags
(internal/config/config.go). The camelCase and snake_case fallbacks in
normalizeApiKeyEntry / normalizeProviderKeyConfig / normalizeGeminiKeyConfig /
normalizeOpenAIProvider / normalizeAmpcode* / normalizeConfigResponse are
dead paths. Read kebab-case only.

The legacy openai-compatibility `api-keys` (flat string array) flat-string
branch is also gone — backend startup migration is disabled
(internal/config/config.go:657).
2026-05-28 00:33:05 +08:00
LTbinglingfeng 5815053346 Merge remote-tracking branch 'origin/dev' into dev 2026-05-26 00:22:25 +08:00
Dylan 33df50611f fix(auth-files): restore Codex websockets toggle 2026-05-25 23:48:08 +08:00
LTbinglingfeng 48b9879794 fix(models): add support for authIndex in request headers and signature generation 2026-05-25 02:38:42 +08:00
LTbinglingfeng 7e9c5be640 fix(providers): forward stored apiKey and authIndex to discovery and tests
The form's apiKey field is intentionally empty in edit mode (the
placeholder reads "leave blank to keep unchanged"), so model discovery
and the Claude connectivity test were sending requests with no
credentials and getting 401 for Codex / Claude / Gemini providers.

- BaseProviderForm derives a fallbackAuthIndex from resource.raw.authIndex
  alongside the existing fallbackApiKey and passes both into the
  discovery and connectivity hooks
- modelsApi.fetch{V1,Claude,Gemini,}ModelsViaApiCall accept an optional
  authIndex and forward it on apiCallApi.request so the backend can
  inject the OAuth/auth-file token for providers that store the key
  externally
- useModelDiscovery threads the authIndex through to every brand
- useConnectivityTest threads authIndex through the Claude path and no
  longer rejects the request as "API key required" when an authIndex is
  available
2026-05-25 02:24:49 +08:00
LTbinglingfeng a44bcd3337 feat(providers): enhance provider configuration handling and serialization 2026-05-24 00:51:09 +08:00
LTbinglingfeng 57eeff505f feat: add support for xAI provider with OAuth integration and localization 2026-05-17 02:46:05 +08:00
Supra4E8C 632be0bbe0 refactor: remove unused chart configuration and latency utilities
- Deleted chartConfig.ts and its exports from index.ts, as they are no longer needed.
- Removed latency.ts and its related functions for latency statistics and formatting.
- Cleaned up usageIndex.ts by removing functions related to indexing usage details, as they are not in use.
2026-05-02 03:41:14 +08:00
Supra4E8C 7d3c57092b refactor: remove unused fields and streamline auth file editor logic 2026-05-02 03:22:32 +08:00
Supra4E8C b25f722fef Refactor provider usage tracking to utilize recent requests data
- Introduced `useProviderRecentRequests` hook to manage recent request data for providers.
- Replaced usage of `useProviderStats` with `useProviderRecentRequests` in relevant components.
- Updated `VertexSection` and other provider components to consume recent request data instead of key stats.
- Removed obsolete `useProviderStats` hook and related usage details.
- Added new utility functions for handling recent request data, including normalization and aggregation.
- Updated API service to fetch recent request usage data.
- Refactored `AuthFileCard` and related components to utilize recent request statistics.
- Cleaned up unused code and types related to previous usage stats implementation.
2026-05-02 02:53:15 +08:00
Supra4E8C a4d1c23634 feat: add toggle functionality for enabling/disabling OpenAI providers 2026-04-30 19:52:01 +08:00
Supra4E8C a1401d40c0 feat: enhance usage tracking with auth index support across providers 2026-04-18 18:14:22 +08:00
Supra4E8CandGitHub cf41ca3edb Merge pull request #216 from CtriXin/fix/usage-rfc3339-nanoseconds
fix(usage): normalize high-precision RFC3339 timestamps
2026-04-17 23:17:07 +08:00
xin 496f9900c6 fix(usage): normalize high-precision RFC3339 timestamps 2026-04-15 19:12:48 +08:00
Supra4E8C 74badcac8b fix(oauth): remove iflow cookie login 2026-04-14 23:25:17 +08:00
Supra4E8C 70a12bba4f fix(oauth): remove qwen oauth card 2026-04-14 23:22:20 +08:00
Supra4E8C 5cbfbe8fea feat(config): add antigravity credits visual toggle 2026-04-12 00:41:53 +08:00
Supra4E8C c20f705723 fix(ai-providers): include base-url when deleting provider configs 2026-04-09 23:58:09 +08:00
Supra4E8C a388f72f5f feat(authFiles): enhance file upload and deletion handling with batch processing 2026-03-27 23:22:38 +08:00
Supra4E8C 75f4c7cd1a chore(storage): clarify local storage is obfuscation 2026-03-27 22:06:45 +08:00
Supra4E8C 163c1ac29d fix(openai): treat Authorization header as case-insensitive 2026-03-27 22:03:57 +08:00
Supra4E8C e44a9fc099 feat(auth-files): improve credential cards, bulk actions, and dedupe auth file list 2026-03-22 14:41:57 +08:00
Supra4E8C 15d9c37bd9 fix(auth-files): revert status toggle to /auth-files/status 2026-03-08 00:23:58 +08:00
Supra4E8C cb8208e0f7 feat(auth-files): enhance error handling for invalid JSON and refactor file upload logic 2026-03-07 16:06:23 +08:00
Supra4E8C 38d7e20320 feat(ai-providers): add ampcode multi-upstream routing and vertex excluded models 2026-03-07 15:36:47 +08:00
Supra4E8C 65b3ebbca9 feat(codex): add model discovery via /v1/models 2026-02-22 00:01:12 +08:00
Supra4E8C d3be0fddcf feat(gemini): add model discovery via /v1beta/models 2026-02-21 23:50:25 +08:00
Supra4E8C 988a979bea feat(ai-providers): extend provider configs and edit UIs 2026-02-21 22:50:10 +08:00
Supra4E8C 3769447604 feat(ai-providers): add Claude model discovery and connectivity test 2026-02-17 01:22:45 +08:00
Supra4E8C dc4ceabc7b refactor(api): centralize url normalization 2026-02-14 00:16:14 +08:00
Supra4E8C 06201a9fc4 feat(ai-providers): add Gemini proxy URL support in provider edit UI 2026-02-13 20:38:54 +08:00
LTbinglingfeng 6c2cd761ba refactor(core): harden API parsing and improve type safety 2026-02-08 09:42:00 +08:00
LTbinglingfeng 2da4099d0b feat(oauth): add kimi provider support 2026-02-06 23:35:47 +08:00
hkfires 2bf721974b feat(auth): load model lists via /model-definitions/{channel} instead of per-file
model sources.
2026-01-27 14:27:26 +08:00
LTbinglingfeng f22d392b21 fix 2026-01-24 18:04:59 +08:00
LTbinglingfeng c89bbd5098 feat(auth-files): add auth-file model suggestions for OAuth mappings 2026-01-24 15:30:45 +08:00
LTbinglingfeng 80daf03fa6 feat(auth-files): add per-file enable/disable toggle 2026-01-24 00:10:04 +08:00
LTbinglingfeng 883059b031 fix(auth-files): fix deleting OAuth model mappings providers 2026-01-19 23:29:11 +08:00
Supra4E8C 0bb34ca74b fix(auth-files): send aliases for oauth model alias patch 2026-01-17 14:34:57 +08:00
hkfires 99c4fbc30d fix(api): use oauth model alias endpoints 2026-01-16 09:13:38 +08:00
Supra4E8C ebb80df24a fix(quota): include project_id in antigravity quota requests 2026-01-14 16:44:36 +08:00
Supra4E8C f663b83ac8 feat(auth-files): normalize OAuth excluded models handling and update related API methods 2026-01-07 12:26:33 +08:00
Supra4E8C 8dca670358 feat: add vertex provider, oauth model mappings, and routing/log settings 2026-01-05 19:03:05 +08:00
LTbinglingfeng 7cab1e8782 fix(oauth): remove iFlow provider from OAuth flow 2026-01-02 00:58:24 +08:00
Supra4E8C c17217875c fix(ai-providers): route openai compat model fetch/test through api-call to avoid CORS 2025-12-28 18:10:21 +08:00
Supra4E8C 79f6d87d7b fix(api): improve version header parsing for non-plain headers 2025-12-28 10:55:34 +08:00
Supra4E8C 8ca6d31a26 feat(oauth): add vertex json login via vertex/import 2025-12-27 08:02:46 +08:00
Supra4E8C 66c6073bbc feat(usage): add usage stats export/import actions 2025-12-27 00:49:41 +08:00
Supra4E8C 2dd3f233d3 feat(logs): add long-press request log download and hints 2025-12-27 00:30:18 +08:00