概览
dsh-plugin-price-aware
README / ZH
插件文档
目录摘要
dsh.pub 核对固定版本的组合包契约、运行时事实与分发语义;完整 README 请查看源仓库。
在 GitHub 阅读完整 READMELIMITATIONS
已知限制
- **The bundled price table is a dated snapshot** (`asOf` in `src/pricing/catalog.ts`, DeepSeek's page as of 2026-09-21). After 45 days the block admits it may be stale. For gateways that publish rates on `/v1/models`, use `catalogFromProviderModels()` instead of the snapshot — that path is the one the live test exercised. - **Chinese public holidays default to an empty list.** Weekday peak hours are correct; a holiday that should bill off-peak will bill peak until you add it. Guessing a holiday calendar into a billing path is worse than an honest gap. - **Peak windows are configurable but not provider-aware.** Any provider with different peak rules needs `peakMinutes` changes at the rules layer. - **A local ledger is not a balance.** When the provider has no credits endpoint, `spentMicros` drifts from reality with every unpriced call, discount, or billing rule we do not know about. In the live test the gateway refused for lack of funds while our books said 84% of the budget remained. The plugin must say "as far as I can see" wherever it states remaining money, and `/money` shows how many events went unpriced. - **`dsh` is a developer preview** with no ABI stability promise. `@deepseek-ai/dsh-base` is pinned for typechecking; expect churn between alpha tags. - **Cache-write tokens are priced at zero** because DeepSeek's prompt cache is automatic and unbilled. Anthropic-style providers that bill cache writes at 1.25× need `perMillion.cacheWrite` set. - **The gate can only speak where dsh lets it.** Today that is `tools/pre-execute`; a hard per-request cap would need a model-call veto, which the harness reserves for its own loop.
