Repository navigation
feat: 新增豆包工作(doubaowork)供应商 - #561
Merged
Merged
Conversation
- 新增 `internal/providers/doubaowork` 包,将豆包工作订阅转换为网关上的 OpenAI 兼容模型 - 账号通过粘贴已登录 doubao.com 会话的 Cookie 导入,服务端在导入时校验 - 对话将完整历史、工具定义和结构化输出要求编码成单条上游请求,回复转成 OpenAI 增量流;工具调用回复容忍围栏、前后解释文字和截断 JSON - 按账号维护模型目录(含推理等级、窗口、费率),支持 SSR HTML 解析与基线菜单回退 - 配额聚合订阅额度、活动赠送卡,签到状态只读(不发送领取请求,避免消耗当天额度) - 风控/验证码错误归类为 invalid_request,网关不切换账号或冷却账号 - 图片暂不支持(上传需前端签名),以明确提示拒绝而非静默丢弃 - 前端新增添加豆包工作账号入口(Cookie 粘贴表单),AccountCard 显示 Cookie 字段,ProviderMark 渲染豆包工作 logo - executor 注册 `doubaowork/` 模型前缀,registry 新增对应 ProviderDescriptor
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
doubaowork(Doubao Work / 豆包工作,CN-only,无别名),把豆包工作订阅额度接入为网关上的 OpenAI 兼容模型(chat / models / usage / checkin)。/passport/account/info/v2/+/alice/user/launch即时校验 uid/昵称/bot/设备标识,按 uid 一致性持久化。账号卡片以「粘贴 Cookie」重新认证。STREAM_CHUNK/CHUNK_DELTA/STREAM_MSG_NOTIFY,block_type=10040归为 reasoning)翻译为 OpenAI 增量;工具回复容忍围栏/前后解释/截断 JSON;同账号串行 + 临时会话清理。modeSelectData的 office 菜单,与内置基线取并集(只增不减、隐藏 need_upgrade),扣费倍率并入模型展示名。account_credential_payloads表。Test plan
go test ./...go vet ./...cd worker && npm testcd frontend && npm run build && npm run lintchangelog/unreleased/<slug>.md(changelog/unreleased/doubaowork-provider.md)