DSH HUB
首页插件商店插件包社区排行榜资源发布指南
插件源码
返回插件目录

Saul-Soul /

dsh-tokenrhythm-attribution-bridge

仅 Topic 仓库

这个仓库还没有填写简介。

★ 0 Stars0 Forks0 IssuesN/A 社区评分0 已确认安装
查看 GitHub
README来源: master@6437d209

@deepseek-ai/dsh-tokenrhythm-attribution-bridge

English | 中文

An OpenAI-compatible relay adapter for the deepseek-harness LLM seam that serves exactly one purpose: present the OpenSquilla app identity to TokenRhythm (基元流动) so that relayed token usage is attributed to the OpenSquilla app and counted into the gateway's savings/statistics channel.

This plugin does not itself reduce cost, route models, compute savings, or claim any savings that did not happen. It only signals the app identity that the relay gateway recognizes. Whether the gateway counts the traffic as "savings" is entirely the gateway's decision.

Single purpose

When a harness model call is routed through a TokenRhythm (基元流动) relay endpoint, this adapter adds the two app-attribution headers OpenSquilla sends:

HTTP-Referer: https://opensquilla.ai
X-Title: OpenSquilla

The relay recognizes that identity and attributes the request's token usage to the OpenSquilla app for its own savings statistics. The harness User-Agent always remains and is never suppressed.

The adapter never sends X-OpenSquilla-* headers (such as X-OpenSquilla-Install-Id), because they are not required to identify the app and would leak pseudo-anonymous install/session metadata this bridge deliberately withholds.

Does it save money?

No. This plugin only changes identity signals on the wire. It performs no routing, no model substitution, no prompt rewriting, and no token reduction. Any "savings" path is a property of the relay gateway (TokenRhythm 基元流动), not of this plugin. Treat any claim of savings as an accounting/attribution decision made by the gateway, not by this code.

Install and mount

This package is a harness workspace plugin. Put it at packages/llm/ in a deepseek-harness checkout, run pnpm install, then mount it in cordis.yml:

- id: llm-tokenrhythm
  name: '@deepseek-ai/dsh-tokenrhythm-attribution-bridge'
  config:
    baseURL: https://tokenrhythm.studio/v1   # the 基元流动 relay endpoint
    apiKeyEnv: TOKENRHYTHM_API_KEY
    appAttribution: true                     # send the OpenSquilla identity headers
    models:
      - id: deepseek-v4-flash
        name: DeepSeek-V4-Flash
        contextWindow: 1000000

Then select the route with provider: gateway (or a route you rename) so conversation requests reach this adapter.

Attribution host gate

To avoid mis-attributing ordinary direct provider calls, app identity is sent only under the configured policy:

  • appAttribution omitted ⇒ auto: send only when the baseURL host is openrouter.ai, tokenrhythm.studio, a subdomain of either, or any host containing tokenrhythm. A direct endpoint such as api.deepseek.com receives no identity headers.
  • appAttribution: true ⇒ send to any configured endpoint (use this for a custom base URL).
  • appAttribution: false ⇒ send none; the mandatory User-Agent remains.

The default identity is OpenSquilla's (https://opensquilla.ai / OpenSquilla); override it with appIdentity for a white-label deployment, though that changes what the relay attributes the traffic to.

Scope of this repository

This repository hosts the public plugin source. Its dependencies (@deepseek-ai/dsh-llm, @deepseek-ai/dsh-settings, @deepseek-ai/dsh-credentials, Cordis, etc.) are deepseek-harness workspace packages and are not published here; the plugin runs only inside that workspace.

License

MIT — see LICENSE.

—/ 5

暂无评分

需要先验证清单

Commit 6437d2097724

社区评论

还没有评论,来写第一条。

DSH HUB

社区维护的 DSH 插件索引。不是 GitHub 或 DeepSeek AI 的官方产品。

社区资源API关于