<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="atom.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://firefox2100.github.io/dsh-ai-providers/zh-Hans/blog</id>
    <title>DSH AI Providers Blog</title>
    <updated>2026-10-16T00:00:00.000Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <link rel="alternate" href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/blog"/>
    <subtitle>DSH AI Providers Blog</subtitle>
    <icon>https://firefox2100.github.io/dsh-ai-providers/zh-Hans/img/favicon.svg</icon>
    <entry>
        <title type="html"><![CDATA[DSH AI Providers 已可投入使用]]></title>
        <id>https://firefox2100.github.io/dsh-ai-providers/zh-Hans/blog/dsh-ai-providers-ready-for-use</id>
        <link href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/blog/dsh-ai-providers-ready-for-use"/>
        <updated>2026-10-16T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[为 DeepSeek Harness 插件提供统一的语言模型、检索、语音和图片生成接口。]]></summary>
        <content type="html"><![CDATA[<p>DSH AI Providers 现在已经可以供开发者和用户安装使用。0.1.3 版本已发布到 npm，完整提供方套件可以加入 DeepSeek Harness 配置档，供消费插件使用的接口也已有完整文档。</p>
<p>这个项目为 DSH 插件提供一套与具体厂商无关的接口，用于语言模型、嵌入、重排序、文本转语音、语音转文本和图片生成。插件不必再自行实现凭据存储、提供方选择、并发控制和不同厂商的请求协议。</p>
<!-- -->
<h2 class="anchor anchorTargetStickyNavbar_hA1m" id="一套接口覆盖多种-ai-服务">一套接口覆盖多种 AI 服务<a href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/blog/dsh-ai-providers-ready-for-use#%E4%B8%80%E5%A5%97%E6%8E%A5%E5%8F%A3%E8%A6%86%E7%9B%96%E5%A4%9A%E7%A7%8D-ai-%E6%9C%8D%E5%8A%A1" class="hash-link" aria-label="一套接口覆盖多种 AI 服务的直接链接" title="一套接口覆盖多种 AI 服务的直接链接" translate="no">​</a></h2>
<p>AI 功能往往从彼此独立的集成开始。插件先为嵌入实现一套连接，再为语音实现另一套；需要支持第二家提供方时，同样的工作又要重做。功能代码最终会混入鉴权、端点、请求格式、错误处理和设置界面。</p>
<p>DSH AI Providers 把这些接线工作放到稳定的 TypeScript 服务之后。消费插件调用 <code>@dsh-ai-providers/core</code> 中的接口，各提供方软件包负责实现接口，<code>@dsh-ai-providers/runtime</code> 则处理注册、选择、设置、凭据、连接测试和共享并发限制。</p>
<p>当前契约覆盖：</p>
<ul>
<li class="">语言模型路由与流式响应；</li>
<li class="">嵌入与重排序；</li>
<li class="">文本转语音，以及文件或实时语音转文本；</li>
<li class="">图片生成，并在提供方支持时使用参考图。</li>
</ul>
<p>共用接口有意保持精简。厂商软件包仍可公开实用的请求参数，运行时也能显示这些设置，而消费插件无需了解对应厂商。</p>
<h2 class="anchor anchorTargetStickyNavbar_hA1m" id="首个正式可用版本中的提供方">首个正式可用版本中的提供方<a href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/blog/dsh-ai-providers-ready-for-use#%E9%A6%96%E4%B8%AA%E6%AD%A3%E5%BC%8F%E5%8F%AF%E7%94%A8%E7%89%88%E6%9C%AC%E4%B8%AD%E7%9A%84%E6%8F%90%E4%BE%9B%E6%96%B9" class="hash-link" aria-label="首个正式可用版本中的提供方的直接链接" title="首个正式可用版本中的提供方的直接链接" translate="no">​</a></h2>
<p>完整维护套件会安装运行时和四个提供方软件包。</p>
<p><code>@dsh-ai-providers/openai</code> 通过可复用的 OpenAI 兼容连接提供语言模型、嵌入、语音和图片生成。<code>@dsh-ai-providers/localai</code> 使用同类协议，并加入 LocalAI 的默认设置、重排序、实时转写和原生图片参数。<code>@dsh-ai-providers/anthropic</code> 通过 Anthropic Messages API 提供语言模型。<code>@dsh-ai-providers/jina-cohere</code> 支持 Jina 与 Cohere 兼容的重排序端点。</p>
<p>OpenAI 兼容传输层还以 <code>@dsh-ai-providers/openai-compatible</code> 单独发布。其他提供方作者可以复用它，而不必依赖 OpenAI 插件本身。</p>
<p>连接和凭据只需在 DSH 中配置一次。各项能力可以独立选择合适的连接。例如，本地端点可以提供语言模型和嵌入，另一项服务负责语音或重排序。</p>
<h2 class="anchor anchorTargetStickyNavbar_hA1m" id="面向消费插件设计">面向消费插件设计<a href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/blog/dsh-ai-providers-ready-for-use#%E9%9D%A2%E5%90%91%E6%B6%88%E8%B4%B9%E6%8F%92%E4%BB%B6%E8%AE%BE%E8%AE%A1" class="hash-link" aria-label="面向消费插件设计的直接链接" title="面向消费插件设计的直接链接" translate="no">​</a></h2>
<p>项目的主要读者是 DSH 插件开发者。只安装套件不会增加一个助手，也不会自行发送任何 AI 请求。它提供的是供其他插件消费的服务。</p>
<p>消费插件声明所需服务，然后调用稳定契约。例如，嵌入服务直接返回可用向量，而向量仍由消费插件与自己的数据一起持久化。消费插件最了解自身生命周期和失效规则，因此项目不会强加一个无法理解这些规则的共享长期缓存。</p>
<p>服务遵循 DSH 的实时配置模型。提供方选择和请求默认值变化时，消费代码无需修改。不可用的能力会撤回可用服务值，不会留下一个只在调用时含糊失败的空壳。错误通过共用类型跨越边界，不把厂商异常泄露给消费插件。</p>
<p>并发限制也由各插件共享。限制可覆盖某条模型路由或整项能力，也可为前台工作预留容量。后台索引和媒体任务可以排队，但不会无限拖住用户的下一次请求。</p>
<p><a class="" href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/docs/consumers/using-services">消费插件指南</a>介绍服务接口和生命周期规则。要实现其他厂商，可从<a class="" href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/docs/providers/creating-provider">提供方开发指南</a>和<a class="" href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/docs/reference/core-contracts">核心契约参考</a>开始。</p>
<h2 class="anchor anchorTargetStickyNavbar_hA1m" id="可投入使用的具体范围">“可投入使用”的具体范围<a href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/blog/dsh-ai-providers-ready-for-use#%E5%8F%AF%E6%8A%95%E5%85%A5%E4%BD%BF%E7%94%A8%E7%9A%84%E5%85%B7%E4%BD%93%E8%8C%83%E5%9B%B4" class="hash-link" aria-label="“可投入使用”的具体范围的直接链接" title="“可投入使用”的具体范围的直接链接" translate="no">​</a></h2>
<p>0.1.3 是我认为可以正常使用的第一个版本。所有公开软件包使用同一版本；适用的软件包包含 DSH bundle 元数据；发布流程会先执行类型检查、自动测试、生产构建和软件包校验。</p>
<p>项目当前支持 DSH <code>&gt;=0.2.0-rc.2 &lt;0.3.0</code>。DSH 仍处于稳定版之前，因此这个兼容范围需要认真对待。之后的 DSH 版本可能需要对应的提供方更新。<code>@dsh-ai-providers/core</code> 旨在为消费插件提供稳定表面，但 0.1.x 仍是早期公开版本，不能理解为契约永远不会变化。</p>
<p>语言模型、嵌入、重排序、语音和图片生成也已经配合 LocalAI 做过实际验证。各提供方指南会说明软件包支持的能力，以及上游服务本身带来的限制。这里的“可用”并不意味着所有兼容端点的行为会完全相同。</p>
<h2 class="anchor anchorTargetStickyNavbar_hA1m" id="安装完整套件">安装完整套件<a href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/blog/dsh-ai-providers-ready-for-use#%E5%AE%89%E8%A3%85%E5%AE%8C%E6%95%B4%E5%A5%97%E4%BB%B6" class="hash-link" aria-label="安装完整套件的直接链接" title="安装完整套件的直接链接" translate="no">​</a></h2>
<p>把维护套件加入需要使用它的 DSH 配置档：</p>
<div class="language-bash codeBlockContainer_TJey theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_IKgH"><pre tabindex="0" class="prism-code language-bash codeBlock_cpk8 thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines__RHY"><div class="token-line" style="color:#393A34"><span class="token plain">dsh plugin --profile &lt;profile&gt; add @dsh-ai-providers/all</span><br></div></code></pre></div></div>
<p>重启配置档，然后打开 <strong>设置 &gt; AI Providers</strong>。配置所需连接和凭据引用，选择启用的服务，并在设置页中测试。<a class="" href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/docs/getting-started/installation">安装指南</a>还说明了用这些语言模型路由替换 DSH 自带适配器时需要调整的配置档项目。</p>
<p>只需要部分能力时，也可以单独安装软件包。插件开发者通常只依赖 <code>@dsh-ai-providers/core</code> 的类型和契约，把具体提供方选择留给用户的配置档。</p>
<h2 class="anchor anchorTargetStickyNavbar_hA1m" id="接下来会写什么">接下来会写什么<a href="https://firefox2100.github.io/dsh-ai-providers/zh-Hans/blog/dsh-ai-providers-ready-for-use#%E6%8E%A5%E4%B8%8B%E6%9D%A5%E4%BC%9A%E5%86%99%E4%BB%80%E4%B9%88" class="hash-link" aria-label="接下来会写什么的直接链接" title="接下来会写什么的直接链接" translate="no">​</a></h2>
<p>项目现在已有可用的基础：共用契约、运行时、维护中的提供方、配置界面、文档和发布流程。之后只有值得单独说明的变化才会写成博客，例如重要提供方、新能力，或开发者契约发生实质变化。</p>
<p>现在可以先在测试配置档安装套件，配置消费插件需要的服务，并把具体兼容问题提交到<a href="https://github.com/Firefox2100/dsh-ai-providers/issues" target="_blank" rel="noopener noreferrer" class="">项目 issue tracker</a>。</p>]]></content>
        <author>
            <name>Firefox2100</name>
            <uri>https://github.com/Firefox2100</uri>
        </author>
        <category label="DSH AI Providers" term="DSH AI Providers"/>
        <category label="Release" term="Release"/>
    </entry>
</feed>