1406 Commits

Author SHA1 Message Date
CaIon
d22f889e5d fix(xAI): set MaxTokens to nil when MaxCompletionTokens is 0 for grok-3-mini model 2026-03-31 19:16:16 +08:00
CaIon
20399d3c8f fix: harden SSRF protection for unauthenticated and user-level endpoints
- Add ValidateURLWithFetchSetting check before fetching MJ image URLs
  in RelayMidjourneyImage (unauthenticated endpoint)
- Add ValidateURLWithFetchSetting check before fetching video URLs
  in VideoProxy (upstream-controlled URL)
- Enable ApplyIPFilterForDomain by default to prevent DNS rebinding
  bypass of SSRF protection
- Elevate FetchModels endpoint from AdminAuth to RootAuth
- Update frontend: mark domain IP filtering as recommended, update
  description and i18n translations (zh-CN/zh-TW/en/fr/ja/ru/vi)
2026-03-31 17:57:47 +08:00
CaIon
5238f279db feat: record stream interruption reasons via StreamStatus
Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Build Electron App / build (windows-latest) (push) Has been cancelled
Build Electron App / release (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
- Add StreamStatus type (relay/common) to track stream end reason
  (done/timeout/client_gone/scanner_error/eof/panic/ping_fail) and
  accumulate soft errors during streaming via sync.Once + sync.Mutex.
- Add StreamResult (relay/helper) as the callback interface: adapters
  call sr.Error() for soft errors, sr.Stop() for fatal, sr.Done() for
  normal completion. No early-return problem — multiple errors per chunk
  are naturally supported.
- Refactor StreamScannerHandler callback from func(string) bool to
  func(string, *StreamResult). All 9 channel adapters updated.
- Write stream_status into log other JSON field (admin-only) with
  status ok/error, end_reason, error_count, and error messages.
- Frontend: display stream status in log detail expansion for admins.
2026-03-31 16:54:39 +08:00
feitianbubu
62b9aaa520 feat: prevent metadata from overriding model fields 2026-03-27 15:31:41 +08:00
Calcium-Ion
0191a68d4e
Merge pull request #3400 from seefs001/fix/openai-usage
refactor: optimize billing flow for OpenAI-to-Anthropic convert
2026-03-23 15:03:57 +08:00
Calcium-Ion
763c3ff709
Merge pull request #3331 from seefs001/fix/claude-beta-query
fix: apply forced beta query at final upstream URL stage
2026-03-23 15:03:36 +08:00
Seefs
9ecad90652 refactor: optimize billing flow for OpenAI-to-Anthropic convert 2026-03-23 14:22:12 +08:00
wenyifan
2c3ae32c8e fix map 2026-03-20 16:48:04 +08:00
wenyifan
498199b37d fix code quality 2026-03-20 16:38:48 +08:00
wenyifan
ff29900f30 feat: Add support for counting cache-hit tokens in llama.cpp OpenAI-Compatible API 2026-03-20 16:10:18 +08:00
Seefs
e520977efc fix: apply forced beta query at final upstream URL stage 2026-03-19 15:49:50 +08:00
Seefs
8aa8b81e03 fix: original_model && upstream_model paramOverrideKeyAuditPaths 2026-03-17 17:00:01 +08:00
Seefs
bc80477b1a feat: simplify param override audit UI and operation labels 2026-03-17 17:00:01 +08:00
Seefs
5db25f47f1 feat: add param override audit modal for usage logs 2026-03-17 17:00:01 +08:00
CaIon
da8a52f50a feat: add conditional setting for HTTP headers in OpenRouter channel type 2026-03-12 19:05:30 +08:00
Seefs
24ec27f844 Merge pull request #3221 from RedwindA/chore/updateModelList
Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Build Electron App / build (windows-latest) (push) Has been cancelled
Build Electron App / release (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
chore: update model lists for frequently used channels
2026-03-12 15:13:03 +08:00
CaIon
5e9cc681f5 feat: update header title for OpenRouter channel type 2026-03-12 15:05:58 +08:00
RedwindA
7e68e1b36a chore: update model lists for frequently used channels 2026-03-11 23:39:18 +08:00
Calcium-Ion
45a59d32fb Merge pull request #3182 from seefs001/feature/params-override-beta-header-append
Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
feat:support $keep_only_declared and deduped $append for header override
2026-03-10 02:03:02 +08:00
Calcium-Ion
3b5d1daf39 Merge pull request #3148 from feitianbubu/pr/d8a25d36204224f8a4248b0ab3b03ba703796ea3
fix: kling risk fail return openAIVideo error
2026-03-09 22:19:04 +08:00
Seefs
d087cc5025 feat:support $keep_only_declared and deduped $append for header token overrides 2026-03-09 00:12:53 +08:00
CaIon
fb76abb329 fix: update OpenAI request fields to use json.RawMessage for dynamic data handling 2026-03-06 19:10:42 +08:00
feitianbubu
2e20ede2a0 fix: kling risk fail return openAIVideo error 2026-03-06 16:32:52 +08:00
Seefs
3defef3588 fix: ignore top_p 2026-03-06 12:07:36 +08:00
Seefs
172f92aa72 fix: ignore top_p 2026-03-06 12:07:00 +08:00
Seefs
12aacf27b6 fix: If top_p is not provided, Claude's logic will automatically set it to 1. 2026-03-06 12:03:51 +08:00
Calcium-Ion
728607b8f5 Merge pull request #2769 from feitianbubu/pr/3d0aaa75866f8d958a777a7e7ac8c1e4b5b3e537
feat: kling cost quota support use FinalUnitDeduction as totalToken
2026-03-06 11:46:59 +08:00
Seefs
cd1d43ae47 Merge pull request #3120 from nekohy/main
feats: repair the thinking of claude to openrouter convert
2026-03-05 18:10:46 +08:00
feitianbubu
42500b3317 fix: fetch model add header passthrough rule key check 2026-03-05 17:49:36 +08:00
Seefs
d2332685db feat: add wildcard path support and improve param override templates/editor 2026-03-05 16:39:34 +08:00
Nekohy
a4629f2630 feats: repair the thinking of claude to openrouter convert 2026-03-05 06:12:48 +08:00
CaIon
6f818574ab fix: improve error message for unsupported image generation models 2026-03-04 00:36:03 +08:00
feitianbubu
c79c1f95fd fix: use default model price for radio price model 2026-03-03 11:22:04 +08:00
Calcium-Ion
151264dfdc Merge pull request #3081 from BenLampson/main
Return error when model price/ratio unset
2026-03-02 22:01:21 +08:00
Seefs
618fce621b Revert "fix: aws text content blocks must be non-empty" 2026-03-02 19:43:00 +08:00
Seefs
04954f1058 Revert "Fix/aws non empty text" 2026-03-02 19:40:53 +08:00
Calcium-Ion
0d81053e56 fix: tool responses (#3080) 2026-03-02 19:23:50 +08:00
Seefs
7cc8ec2c91 fix: tool responses 2026-03-02 19:22:37 +08:00
Fat Person
bea317ac7e Return error when model price/ratio unset
#3079
Change ModelPriceHelperPerCall to return (PriceData, error) and stop silently falling back to a default price. If a model price is not configured the helper now returns an error (unless the user has AcceptUnsetRatioModel enabled and a ratio exists). Propagate this error to callers: Midjourney handlers now return a MidjourneyResponse with Code 4 and the error message, and task submission returns a wrapped task error with HTTP 400. Also extract remix video_id in ResolveOriginTask for remix actions. This enforces explicit model price/ratio configuration and surfaces configuration issues to clients.
2026-03-02 19:09:48 +08:00
Seefs
ad326beb10 Merge pull request #3066 from seefs001/fix/aws-header-override
Fix/aws header override
2026-03-02 18:54:56 +08:00
Seefs
2df604bbad fix: default empty input_json_delta arguments to {} for tool call parsing 2026-03-02 15:51:55 +08:00
Seefs
da11617776 fix: preserve tool_use on malformed tool arguments to keep tool_result pairing valid 2026-03-02 15:41:03 +08:00
Seefs
4d6f9a94a3 fix: aws text content blocks must be non-empty 2026-03-02 15:31:37 +08:00
Seefs
2cf3c1836c fix: preserve explicit zero values in native relay requests 2026-03-01 15:47:03 +08:00
CaIon
e22f59e449 feat(gemini): update request structures for Veo predictLongRunning
Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
- Refactored the request URL and body construction methods to align with the Veo predictLongRunning endpoint.
- Introduced new data structures for Veo instances and parameters, replacing the previous Gemini video generation configurations.
- Updated the Vertex adaptor to utilize the new Veo request payload format.
2026-02-28 18:42:54 +08:00
Seefs
8103b4b1a7 Merge pull request #3009 from seefs001/feature/improve-param-override
feat: improve channel override ui/ux
2026-02-28 18:19:40 +08:00
CaIon
32d9ae1f83 feat(gemini): implement video generation configuration and billing estimation
- Added Gemini video generation configuration structures and payloads.
- Introduced functions for parsing and resolving video duration and resolution from metadata.
- Enhanced the Vertex adaptor to support Gemini video generation requests and billing estimation based on duration and resolution.
- Updated model pricing settings for new Gemini video models.
2026-02-28 17:37:08 +08:00
Seefs
054370abdc feat: support token-map rewrite for comma-separated headers and add bedrock anthropic-beta preset 2026-02-27 19:47:32 +08:00
Seefs
a955d4102d refactor(override): simplify header overrides to a lowercase single map 2026-02-25 17:24:18 +08:00
Seefs
3034fb8899 fix: merge runtime and channel header overrides, skip missing source headers 2026-02-25 16:12:34 +08:00