Skip to content

Commit 435e4c2

Browse files
committed
feat(sponsors)+docs(ui): 无凭证引导按赞助档位排序 + 自定义供应商标注协议边界
- 无凭证引导(Studio 横幅 + CLI ② 路径)赞助商列表加入多元探索(注册送 3 元) 并排第一——顺序按赞助档位:多元探索(进阶)> CCSub / Cubence(标准); 示例命令同步换成 --provider duoyuanx。供应商面板多元探索本就排首位,不动 - 添加自定义供应商页顶部标注协议边界(中英):走 OpenAI 兼容协议 (端点/chat/completions · Bearer 鉴权)是聚合/中转商事实标准,所以 端点 + key + 模型名即可直连——回应"表单这么简单真的够吗"的合理疑惑; 同时指明 Anthropic 协议中转和运行参数(温度/超时/重试)各自的正确入口
1 parent 40f2c5a commit 435e4c2

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

src/cli.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -713,10 +713,11 @@ function printFirstRunGuide(provider: string): void {
713713
L(` ao compose "…" --run --provider claude-code`);
714714
}
715715
L('');
716-
L(` ② 用「送额度」的中转(几十秒拿 key,一个 key 通 Claude/GPT/Gemini 全家桶):`);
717-
L(` · CCSub 注册送 $5 → https://www.ccsub.net/register?ref=8G5W4JK4`);
718-
L(` · Cubence → https://cubence.com/signup?code=SCW29JP9&source=agency`);
719-
L(` 拿到 key:ao compose "…" --run --provider ccsub --api-key <你的key>`);
716+
L(` ② 用「送额度」的聚合/中转(几十秒拿 key,一个 key 通 Claude/GPT/Gemini 全家桶):`);
717+
L(` · 多元探索 注册送 3 元 → https://duoyuanx.com/register?aff=LErO`);
718+
L(` · CCSub 注册送 $5 → https://www.ccsub.net/register?ref=8G5W4JK4`);
719+
L(` · Cubence → https://cubence.com/signup?code=SCW29JP9&source=agency`);
720+
L(` 拿到 key:ao compose "…" --run --provider duoyuanx --api-key <你的key>`);
720721
L('');
721722
L(` ③ 本地免费跑(需先装 Ollama 并拉好模型,建议 70B+):`);
722723
L(` ao compose "…" --run --provider ollama --model llama3`);

web/server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,9 @@ app.post('/api/compose', async (req, res) => {
988988
error: 'no_credentials',
989989
provider: provider || process.env.AO_PROVIDER || 'apinebula',
990990
installedCli: detectInstalledCliProviders(),
991+
// 顺序按赞助档位:多元探索(进阶)> CCSub / Cubence(标准)
991992
sponsors: [
993+
{ name: '多元探索', bonus: '注册送 3 元', url: 'https://duoyuanx.com/register?aff=LErO' },
992994
{ name: 'CCSub', bonus: '注册送 $5', url: 'https://www.ccsub.net/register?ref=8G5W4JK4' },
993995
{ name: 'Cubence', url: 'https://cubence.com/signup?code=SCW29JP9&source=agency' },
994996
],

website/src/components/studio/ProviderConfigView.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,11 @@ export function ProviderConfigView({
370370
{/* add-custom:预设图库 + 基本信息 */}
371371
{isAdd && (
372372
<>
373+
{/* 表单看着"太简单"是有意为之:协议定死 OpenAI 兼容,把这个边界说出来,
374+
用户才不会怀疑"填个 key 和地址怎么可能够" */}
375+
<p className="rounded-xl border border-border/60 bg-muted/40 px-3.5 py-2.5 text-xs leading-relaxed text-muted-foreground">
376+
💡 {p.customProviderProtocolHint}
377+
</p>
373378
<Section title={p.customProviderPresetsLabel}>
374379
<div className="flex flex-wrap gap-1.5">
375380
{CUSTOM_PROVIDER_PRESETS.map((preset) => (

website/src/i18n/translations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ const zh = {
194194
customProviderNoteLabel: "备注(可选)",
195195
customProviderHomepageLabel: "官网链接(可选)",
196196
customProviderPresetsLabel: "预设供应商(点一下自动填名称 + base_url)",
197+
customProviderProtocolHint: "自定义供应商走 OpenAI 兼容协议(端点/chat/completions · Bearer 鉴权)——这是聚合/中转商与各家官方兼容层的事实标准,所以端点 + key + 模型名就能直连。Anthropic 协议中转请在 Claude Code 供应商页配置;温度/超时/重试等运行参数在工作流 YAML 的 llm 块按步骤配置。",
197198
customProviderBaseUrlLabel: "API 端点",
198199
customProviderBaseUrlPlaceholder: "https://api.example.com/v1",
199200
customProviderApiKeyLabel: "API Key(可选,也可以之后再补)",
@@ -833,6 +834,7 @@ const en: typeof zh = {
833834
customProviderNoteLabel: "Note (optional)",
834835
customProviderHomepageLabel: "Homepage URL (optional)",
835836
customProviderPresetsLabel: "Presets (click to auto-fill name + base_url)",
837+
customProviderProtocolHint: "Custom providers speak the OpenAI-compatible protocol (endpoint/chat/completions with Bearer auth) — the de-facto standard for aggregators, relays and official compatibility layers, so endpoint + key + model is all it takes. For Anthropic-protocol relays use the Claude Code provider page; runtime params (temperature/timeout/retries) are configured per step in the workflow YAML llm block.",
836838
customProviderBaseUrlLabel: "API Endpoint",
837839
customProviderBaseUrlPlaceholder: "https://api.example.com/v1",
838840
customProviderApiKeyLabel: "API Key (optional, can add later)",

0 commit comments

Comments
 (0)