Feature: Distributed Captcha Extension, VEO Video Extend & Timeout Optimization#133
Merged
genz27 merged 5 commits intoTheSmallHanCat:mainfrom Apr 30, 2026
Merged
Feature: Distributed Captcha Extension, VEO Video Extend & Timeout Optimization#133genz27 merged 5 commits intoTheSmallHanCat:mainfrom
genz27 merged 5 commits intoTheSmallHanCat:mainfrom
Conversation
# Conflicts: # config/setting.toml
genz27
approved these changes
Apr 30, 2026
Collaborator
genz27
left a comment
There was a problem hiding this comment.
已处理与最新 main 的冲突,并按 PR 侧优先保留功能;补齐合并后的启动/类型/数据库字段问题,收窄扩展权限并清理调试产物。本地验证:compileall、import smoke test、pytest -q 均通过(14 passed)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
add Flow2API Captcha Worker extension support to bypass Google reCAPTCHA Enterprise v3 via real browser injection
support distributed extension nodes: extensions can run on different ports/machines and map to specific backend accounts using unique route_key
temporary Labs tabs are auto-opened and closed for each request to prevent token expiration
add complete video extend logic and automatic concatenation for VEO models
add 4-minute timeout to MEDIA_GENERATION_STATUS_ACTIVE to prevent infinite polling bugs
auto-downgrade models for TIER_ONE accounts to prevent permission errors
Details
动态防过期:在后端请求 Token 时,插件会自动在后台瞬间静默打开 labs.google 标签页,执行 grecaptcha.enterprise 获取真实的 reCAPTCHA Enterprise Token 后立刻销毁标签页,从根本上解决 Token 获取失败和提前过期问题。
分布式多节点路由 (route_key):突破了单机环境限制,在 WebSocket 握手时支持根据 route_key 分发任务。这意味着你可以开无数个不同端口的Chrome浏览器实例,后端能精准把特定账号的打码任务路由给它对应的真实浏览器插件!亲测有效,很稳定
2. 完整的视频续写 (Extend) 与无缝拼接逻辑:
新增了对 extend 视频类型的处理逻辑,支持解析传入的源视频 mediaGenerationId。
调用上游的 generate_video_extend 接口完成 8s 视频续写。
自动无缝拼接:在续写完成后,自动调用拼接接口 (run_concatenation),将原视频与续写片段合并,最终直接向用户返回拼接好的 16s 完整视频链接。
3. 上游生成卡死 (ACTIVE 状态) 的自动熔断机制:
修复了当上游任务进度长时间卡在 45%(MEDIA_GENERATION_STATUS_ACTIVE)时会导致无限轮询的 Bug。
新增了超时阻断:如果在 ACTIVE 状态停留超过 4 分钟(约 80 次轮询),会自动中断并抛出超时失败,防止服务器的并发队列和资源被无效占用。
4. 账号 Tier (等级) 的模型自动适配:
根据 PAYGATE_TIER_ONE 和 TIER_TWO,自动做模型的升降级处理。比如 TIER_ONE 用户误传 ultra 模型时会自动降级到标准版,避免因账号权限不足导致请求直接报错。