Cai
aba34524f1
feat: support native Seedance Ark video task API
2026-09-17 04:14:14 +09:00
刘佳林
242907854d
feat(opencode): add OpenCode platform with Zen and GO account types
...
Keep the internal platform ID opencode_go. Product surface is OpenCode
with account_mode zen|go, model-aware routing across Chat Completions,
Responses, and Anthropic Messages, and X-OpenCode-Session derived from
prompt_cache_key / metadata.user_id so prompt cache can hit.
Unmatched models fall back to /v1/chat/completions. Related to #6742 .
2026-09-11 10:05:24 +08:00
r266-tech
1c0932e173
feat(gateway): retrieve models from the visible catalogue
2026-09-10 15:57:17 +08:00
Wesley Liddick
dbe92a1c24
Merge pull request #6758 from DuskLin/feat/minimax-platform
...
feat(minimax): 增加 MiniMax 平台支持
2026-09-08 18:50:06 +08:00
刘佳林
19382f275e
feat(minimax): 增加 MiniMax 平台支持
...
把 MiniMax 做成与 Kimi / 智谱 / DeepSeek 同级的国产供应商平台:账号创建/编辑、分组、Composite 路由、原生 Token Plan / Coding Plan 额度,以及 OpenAI 兼容模型列表。
额度走 GET api.minimaxi.com|io /v1/api/openplatform/coding_plan/remains(Bearer)。只解析 model_name=general 的 remaining percent;周窗口仅在 current_weekly_status=1 时计入。
Related to #6742
2026-09-07 18:22:56 +08:00
Zero Clover
cff3f89850
feat(groups)!: enforce model allowlists across gateway endpoints
2026-09-05 16:05:17 +08:00
Long Li
22e1b8144a
feat(gateway): expose routed Codex model catalogs
...
Codex model discovery expects a top-level models manifest, but Composite and other non-OpenAI groups either reached the OpenAI live-manifest handler or had no Codex-specific response at all. API key users also had no supported way to fetch that manifest and reference it from config.toml.
Generate minimal manifests from each group's effective model list while preserving the official OpenAI live path and the ordinary /models response. Add the Use Key flow for authenticated catalog download and model_catalog_json configuration without writing the API key into the downloaded file.
2026-08-22 14:43:40 +09:00
Wesley Liddick
219368ec6d
Merge pull request #5654 from zninggo/fix/composite-video-generation
...
fix(gateway): Composite 分组放行视频生成端点
2026-08-21 21:27:17 +08:00
Wesley Liddick
7d9c958482
Merge pull request #5810 from Pluviobyte/codex/fix-responses-input-tokens
...
fix(codex): handle Responses input token preflight
2026-08-19 14:43:33 +08:00
Kingsley
58e147fba6
feat(composite): support Codex endpoints
2026-08-19 04:40:32 +00:00
Rain
bfac49fef9
fix(codex): handle responses input token preflight
2026-08-19 11:34:18 +08:00
Randark
901a0439f1
feat: 国产供应商一等支持(Kimi/Zhipu/DeepSeek 多协议 + 配额/余额监控)
...
后端:
- 协议凭证维度 credentials[api_protocol] ∈ chat_completions(默认)/anthropic/responses(deepseek)
- /v1/messages 零转换直通原生 Anthropic 端点(kimi/zhipu/deepseek),CC/Responses
入站交叉组合走 apicompat 双向转换链(responses/chat_completions anthropic-native 转发器)
- count_tokens:anthropic 协议透传原生端点;其余 CN 协议本地 tiktoken 估算
- Coding Plan 额度探测(5h/weekly 滚动窗口)+ payg 余额探测(kimi/deepseek),
deepseek 双币种 CNY+USD 明细,任一币种达标不停调
- 周期任务 [CNBalance] 并发探测 + 预算随工作量放大;响应式 429 冷却到最早窗口
重置点;余额不足可恢复临时停调;智谱 CREDIT_LIMIT 不污染窗口解析
- CC→anthropic 流式客户端断开后继续排水上游保住 usage 计量
前端:
- 创建/编辑弹窗 account_mode + api_protocol + base_url 联动预设(含 watcher 竞态防护)
- 用量单元格:kimi/zhipu coding 显示 5h/weekly 窗口,kimi/deepseek payg 显示余额,
多币种并列展示;探测失败保留快照;挂载自动探测 5min 去抖
- 调度阈值设置面板补 kimi/zhipu 平台(对齐后端 AllowedSchedulingThresholdPlatforms)
2026-08-15 10:37:51 +00:00
zninggo
1e1798d90d
fix(gateway): Composite 分组放行视频生成端点
...
视频状态(/videos/:id)与内容下载(/videos/:id/content)都已放行
PlatformComposite, 唯独创建端点仅放行 PlatformGrok. Composite 分组
用户配好模型路由后可查询可下载, 唯独创建 404.
补齐放行判断, 与另外两个视频端点保持一致; 其他平台行为不变.
2026-08-15 01:20:26 +08:00
IanShaw027
0de6d7e9ba
feat: 新增独立 /x_search,走原生 x_search 并沿用搜索计费
...
Grok 分组原先只有 /web_search,无法带 handle/日期过滤,也无法走
xAI 的 x_search tool。
- POST /x_search(仅 Grok 分组),复用 web_search 的审计、failover 与按次计费
- 上游 Responses 强制 x_search;计费模型记为 grok-x-search
2026-08-13 07:49:19 +08:00
IanShaw027
07b46e93e4
fix(grok): 修正 voice 路由推导、视频价归一化与门禁缓存驻留
...
- custom-voices endpoint 改由匹配到的路由模板推导(c.FullPath())。
原实现按请求 URL 字面后缀判 /audio,voice_id 恰为 "audio" 时
GET /custom-voices/audio 会被改写成 custom-voices/audio/audio,
把档案查询变成音频下载。补 voice_id="audio" 的路由推导测试。
- NormalizeVideoModelPrices 不再把无法识别的分辨率静默折算成 480p:
新增 LookupVideoBillingResolution 报告未知档位,配置解析路径丢弃并告警,
运行时计费仍走 OrDefault 兜底。model/tier 两层遍历改为排序遍历,
多个别名收敛到同一 family 时结果不再随 Go map 顺序漂移,冲突单价告警。
- grok free quota 软门禁缓存新增过期淘汰。条目按 account_id 键控且只写不删,
账号下线后会驻留至进程结束;淘汰只挂在已受 TTL 约束的查询路径上,
不影响缓存命中热路径。
- 迁移 220 清空非 Grok 分组视频价前先落快照表 groups_video_price_backup_220,
原 UPDATE 不可回滚。
- 简化 grok_search_count 两处等价冗余的事件类型分支。
2026-08-08 11:02:22 +08:00
IanShaw027
35faaa6d21
feat(grok): register custom-voices CRUD and audio download gateway routes
...
Forward list/get/patch/delete and reference-audio paths with safe path segment
encoding, method passthrough, and empty-body GET/DELETE handling.
2026-08-08 08:48:38 +08:00
IanShaw027
165b072908
fix(grok): gateway media/voice routing, models, and status UI polish
...
Align gateway Grok media/voice paths and model lists, harden upstream failure
and quota handling, clear non-Grok video generation config migration, and polish
temp-unsched/status indicators with model whitelist updates.
2026-08-08 01:07:27 +08:00
IanShaw027
79df1647d4
feat(grok): 账单绝对金额、调度阈值 UI、搜索/Voice 计费与 /v1/web_search
...
- BillingSummary 输出 prepaid/monthly_used/on_demand 绝对金额,并映射官方 7d/30d 进度条
- 账号编辑页支持 credentials.account_scheduling_threshold 覆盖;Settings 文案细化
- groups.search_price_per_1k + 管理端/缓存全链路;SearchCount/AudioUsage 请求级计费
- Voice TTS/STT/Realtime 成功路径 RecordUsage;独立 /v1/web_search 原生 Grok 搜索
2026-08-07 15:52:55 +08:00
IanShaw027
99ad01f6de
feat(grok): 网关 Voice TTS/STT/Realtime 与分组音频定价
...
- 中继 xAI Voice HTTP(/tts /stt /custom-voices)与 Realtime WS(/realtime)
仅 Grok 分组可用;账号选调度沿用 chat 能力,不依赖创作中心
- Voice URL 固定走 api.x.ai(CLI proxy base 自动回落)
- 分组级 audio_realtime / TTS / STT 单价:schema + migration 218 +
admin API + GroupsView 表单与 i18n(无创作中心 UI)
2026-08-07 15:08:39 +08:00
shaw
017f6bbd5e
fix(gateway): 收紧上游 URL 路径片段校验
...
网关有若干位置会把客户端可控的字符串拼进上游请求的 URL path(Responses
子路径、Gemini 模型名)。此前这些字符串未经校验直接参与拼接,可能改变上游
请求的路径结构,使实际发出的请求与客户端意图不一致。
- 新增 internal/service/upstream_path_guard.go:路径片段闭集允许清单
(\w + `-` + `.`),拒绝空片段、纯点片段、超长片段与过深后缀
- /responses/*subpath 三条路由入口新增守卫,不可转发的子路径直接 404;
service 层同时保证不产出不合规后缀,拼接函数再兜底一层
- Gemini AI Studio 原先 5 处重复的 URL 拼接收敛为唯一构造点
buildGeminiAIStudioModelActionURL(校验模型片段 + action 白名单)
- Gemini native / GetModel handler 增加入口校验;ForwardAIStudioGET 逐片段校验
- Grok video 端点的 request_id 增加片段合规校验
合法子路径(/compact、/compact/detail、/{id}/cancel 形态)与既有模型名行为
不变,通配路由保留。
2026-07-31 16:11:45 +08:00
song
e6eb23eaac
feat(openai): add Live gateway support
2026-07-25 12:50:46 +08:00
Heatherm Huang
ca6b192728
fix: preserve composite video content routing
2026-07-23 09:26:43 +08:00
Heatherm Huang
06e7d12640
Fix composite Grok video status routing
2026-07-23 09:20:52 +08:00
Heatherm Huang
3a683fff55
Fix composite route alias attribution
2026-07-23 09:20:52 +08:00
Heatherm Huang
a008b63c16
Add composite group route registry
2026-07-23 09:20:18 +08:00
Heatherm Huang
ebc1028771
Add composite group routing
2026-07-23 09:19:24 +08:00
superman2003
1433fbc44d
fix(grok): estimate messages count tokens locally
2026-07-19 12:17:23 +08:00
shaw
8a95a46a69
Merge origin/main into codex/secure-protected-video-content-4498
...
Resolve conflicts with main:
- service/grok_media.go: keep both post-response blocks — #4497 's empty
image-output failover (main) runs first for image endpoints, then this
branch's video-status content-URL rewrite; the endpoint conditions are
mutually exclusive
- handler/openai_gateway_credential_failover_loop_test.go: mark the stub
OAuth accounts media-eligible via the grok_media_eligible extra override,
because this branch moved grok media failover coverage to the generation
endpoint, which is now gated by #4540 's paid-eligibility probe on main
2026-07-18 21:31:28 +08:00
Vz7797
3f6b5c7bd7
fix(grok): proxy protected video content through upstream account
...
(cherry picked from commit a01177e294 )
2026-07-18 14:37:25 +08:00
benjamin
b92bbf0299
fix: 过滤入口拒绝日志并强化鉴权边界
2026-07-18 00:11:18 +08:00
haruka
1fb942dd77
feat: add async image generation tasks
2026-07-15 19:57:37 -07:00
Tian Lee
f59a6ed74c
feat: 增加 API Key 计费倍率自省接口
2026-07-15 22:42:53 +08:00
wucm667
806bb23053
fix: add root Codex models alias
2026-07-14 17:16:24 +08:00
chenjian
909b96edd2
feat: support Grok video edits and extensions
2026-07-13 10:50:42 +08:00
Tian Lee
52071d391b
fix(openai): 转发 Codex alpha/search 独立搜索端点
2026-07-11 20:31:33 +08:00
liminge and Claude Fable 5
13e773ef5e
feat: Codex 客户端模型清单(manifest)透传接口
...
背景:Codex CLI / Codex App 会从 provider 的 GET {base_url}/models?client_version=...
(自定义 provider 模式)或 GET /backend-api/codex/models(chatgpt_base_url 模式)
刷新模型选单,期望 ChatGPT Codex manifest 格式({"models":[{slug,...}]})。
sub2api 此前只提供 OpenAI 兼容格式的 /v1/models,Codex 客户端解析失败后静默
回落到本地缓存,导致指向 sub2api 的 Codex 客户端模型选单永久冻结在切换
provider 当天的状态,新模型(如 gpt-5.6 系列)永远不会出现。
方案:新增 manifest 透传——用组内可调度 OAuth 账号的凭据向
chatgpt.com/backend-api/codex/models 实时转发请求,响应体与 ETag 原样透传。
不在网关侧解析或维护模型清单:manifest schema 随 Codex 客户端版本演进,
透传保证网关无需跟进 schema 变化,且返回的始终是账号真实的模型权限
(区别于静态 DefaultModels 的"理论列表")。
路由:
- GET /backend-api/codex/models(新增)
- GET /v1/models 带 client_version 查询参数且组平台为 openai 时分发到
manifest 透传(client_version 是 Codex 客户端的天然指纹,普通 OpenAI
客户端不携带);其余请求保持原有 OpenAI 格式行为不变。
上游失败时按 fast-fail 返回错误,不伪造列表;Codex 客户端自身会回落缓存。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-07 19:49:40 +08:00
Turtle_Li
8fab636998
feat: complete batch image workflow
2026-07-06 12:22:04 +08:00
Turtle_Li
a994fbd77a
feat: add batch image MVP
2026-07-04 05:30:50 +08:00
Heatherm Huang
3b5d812f7a
fix: route grok media endpoints
2026-07-01 11:43:35 +08:00
Heatherm Huang
4a7148e203
fix: support grok cli compatibility routes
2026-06-29 17:53:19 +08:00
JRBaggins
7a38c66214
Bridge OpenAI count_tokens to responses input_tokens
2026-06-26 17:59:26 +08:00
Heatherm Huang
b2e2c7e69c
fix: harden grok oauth gateway paths
2026-06-26 10:36:09 +08:00
Heatherm Huang
39be1ec97f
feat: add grok subscription support
2026-06-26 10:36:09 +08:00
Wey Gu
ccace69d4e
Add OpenAI embeddings gateway
2026-05-28 19:39:52 +08:00
benjamin and Sisyphus
c3e7476992
fix(gateway): mark local platform gates business-limited
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-05-26 17:19:23 +08:00
gaoren002
5f41899705
fix: bridge codex image generation over responses
2026-04-23 15:13:57 +00:00
lucas morgan
c548021921
feat(openai): 同步生图 API 支持并接入图片计费调度
...
- 同步 OpenAI 图片生成与编辑接口
- 接入图片请求解析、账号调度、转发与用量记录
- 接入图片计费与图片用量落库
- 限制 OAuth 生图仅支持无显式模型和尺寸的基础请求
2026-04-22 12:30:08 +08:00
erio
62e80c602d
revert: completely remove all Sora functionality
2026-04-05 17:11:01 +08:00
Ethan0x0000
d927c0e45f
feat(routes): add platform-based routing split for /v1/responses and /v1/chat/completions
...
Mirror the existing /v1/messages platform split pattern:
- OpenAI groups → OpenAIGateway handlers (existing, unchanged)
- Non-OpenAI groups → Gateway handlers (new Anthropic-upstream path)
Updated both /v1 prefixed routes and non-prefixed alias routes
(/responses, /chat/completions). WebSocket route (/v1/responses GET)
remains OpenAI-only as Anthropic has no WebSocket equivalent.
2026-03-23 16:24:47 +08:00
Ethan0x0000 and Sisyphus
7bd1972f94
refactor: migrate all handlers to shared endpoint normalization middleware
...
- Apply InboundEndpointMiddleware to all gateway route groups
- Replace normalizedOpenAIInboundEndpoint/normalizedOpenAIUpstreamEndpoint and normalizedGatewayInboundEndpoint/normalizedGatewayUpstreamEndpoint with GetInboundEndpoint/GetUpstreamEndpoint
- Remove 4 old constants and 4 old normalization functions (-70 lines)
- Migrate existing endpoint normalization test to new API
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-03-15 22:13:42 +08:00