[Provider]: Support Baidu DuMate (dumate.baidu.com/app) as a built-in provider

オープン
#8,667 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
api

調査の方向性

Start with how the existing quota-tracked providers, Kiro and WorkBuddy, are registered as built-in providers, and how ocx provider add and the dashboard Add provider picker list them. The DuMate upstream wire format and Baidu OAuth flow are not documented in the issue, so the first step is to confirm them against the linked community wrappers. Done means dumate appears in both the picker and the CLI, and its points usage shows in the usage view.

索引モデルが issue の本文から書いたものです。

説明

account-pool enhancement needs-info provider tools
Area

Provider adapters

What are you trying to accomplish?

I want to route Codex and Claude Code traffic through OpenCodex to Baidu DuMate (https://dumate.baidu.com/app), Baidu's desktop AI agent product, so that a DuMate account and its points balance can be used as a coding backend instead of only inside the DuMate client. DuMate signs in with a Baidu account and charges per-message points, so the workflow I need is: add DuMate as a provider in OpenCodex once, then pick a DuMate model in Codex or Claude Code and let the proxy handle protocol translation, streaming, and credit accounting.

What prevents this today?

OpenCodex ships 40+ built-in providers, but none for DuMate. The generic "OpenAI-compatible endpoint" provider entry cannot reach it either, because DuMate's upstream is not a plain OpenAI-compatible API: it is the desktop client / web app backend with Baidu account OAuth and a points-based quota, so auth and request shapes both need provider-specific handling. Community adapters exist that wrap DuMate into OpenAI and Anthropic compatible local endpoints, which proves the mapping is feasible, but nothing in OpenCodex itself understands that wire format today.

What should OpenCodex do?

Add a built-in DuMate provider (adapter plus preset) so it appears in the dashboard Add provider picker and in ocx provider add. The adapter would translate inbound Responses / Chat Completions / Anthropic Messages requests into DuMate's upstream wire format, carry streaming and tool calls where DuMate supports them, handle Baidu account auth the way other OAuth providers do, and surface DuMate points consumption in the dashboard usage view like other quota-tracked providers (Kiro credits and WorkBuddy credits are existing precedents).

Example usage or interface
ocx provider add dumate
codex -m "dumate/dumate-ultra" "Refactor auth.ts to use the shared session helper"

Dashboard equivalent: Providers -> Add provider -> DuMate -> sign in with a Baidu account -> pick a model tier, then run Codex or Claude Code against it with the normal provider/model routing syntax.

Alternatives or workarounds

Point the generic OpenAI-compatible provider entry at a local community gateway such as dumate-api (OpenAI + Anthropic compatible) or dumate2api (adds a Responses adapter for Codex CLI). This works but requires running a separate third-party process outside OpenCodex, loses native Baidu OAuth and points accounting, and its protocol mappings are not shipped, versioned, or tested with OpenCodex. A built-in adapter would remove the extra hop and give one supported configuration surface.

Additional context
Checks
  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.
主要言語
TypeScript
スター
16.9k
フォーク
1.3k
平均マージ
1日 4時間
マージ済み PR(30日)
814

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

lidge-jun/opencodex のほかの issue

lidge-jun/opencodex の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。