• wyuc's avatar
    feat(token-plan): add TokenDance one-key preset for every modality (#1525) · 2cbd011c
    wyuc authored
    * feat(token-plan): add TokenDance one-key preset for every modality
    
    TokenDance is a model gateway: chat and images are OpenAI-compatible at
    /gateway/v1, and the same key authenticates vendor-protocol routes on the
    same host (Ark, MiniMax, Bocha). The preset reuses the existing adapters
    with those route prefixes as base URLs, so one key lights up LLM, image,
    video, TTS and web search from Settings -> Token Plan.
    
    - providers: add a built-in `tokendance` OpenAI-compatible provider
      (TOKENDANCE_* env prefix, logo, provider name in all locales)
    - token-plan: add the TokenDance preset (Seedream image, MiniMax H3 video,
      MiniMax speech TTS, Bocha web search)
    - seedream: use a base URL that already ends in a version segment verbatim,
      so gateway routes like `/ark/v3` do not get `/api/v3` appended
    - minimax-video: route H3-family models through the v2 task API (content
      array submit, task-envelope poll); connectivity checks for H3 probe auth
      on the v2 query route instead of submitting a billable task
    - README: add a one-key quick example and replace the Gemini-specific
      model recommendation with a provider-agnostic setup recommendation
    Co-Authored-By: default avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01Qrrq9CPwb718mpouz8Y2KL
    
    * fix(token-plan): accept preset web-search base URLs and report H3 dimensions per ratio
    
    - web-search: the client base URL allowlist also accepts the exact base URL
      a built-in token plan preset writes for that provider, derived from
      TOKEN_PLAN_PRESETS. Applying a plan whose web-search route is not an
      official vendor host previously stored a URL that the route rejected with
      400. Any other client URL is still rejected.
    - minimax-video: report H3 v2 clip dimensions for 16:9, 9:16, 4:3 and 1:1
      instead of assuming landscape for every non-portrait ratio.
    - tests: pin the allowlist for every preset, the 1:1 H3 dimensions, and
      clear TOKENDANCE_* in the provider-config env isolation list.
    Co-Authored-By: default avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01Qrrq9CPwb718mpouz8Y2KL
    
    ---------
    Co-authored-by: default avatarClaude Opus 5 <noreply@anthropic.com>
    2cbd011c
README.md 54.3 KB