model-management

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Checklist

检查清单

  1. Update
    .env
    and
    secrets/env.json
    (sops) with credentials
  2. Update config/handler with model routing
  3. Update registry with pricing and provider
⚠️ Pricing depends on BOTH model AND provider. Always verify pricing on the provider's website.

  1. 使用凭证更新
    .env
    secrets/env.json
    (通过sops工具)
  2. 更新config/handler中的模型路由配置
  3. 在注册表中更新定价服务商信息
⚠️ 定价同时取决于模型和服务商。请务必在服务商官网核实定价信息。

Files to Update

需要更新的文件

Text Models

文本模型

FilePurpose
text.pollinations.ai/.env
API keys, endpoints
text.pollinations.ai/secrets/env.json
Encrypted secrets (use sops)
text.pollinations.ai/configs/modelConfigs.ts
Model routing config
text.pollinations.ai/availableModels.ts
Service name → config mapping
shared/registry/text.ts
Pricing, provider, aliases, description
文件用途
text.pollinations.ai/.env
API密钥、端点
text.pollinations.ai/secrets/env.json
加密的密钥(使用sops)
text.pollinations.ai/configs/modelConfigs.ts
模型路由配置
text.pollinations.ai/availableModels.ts
服务名称→配置映射
shared/registry/text.ts
定价、服务商、别名、描述

Image/Video Models

图像/视频模型

FilePurpose
image.pollinations.ai/.env
API keys, endpoints
image.pollinations.ai/secrets/env.json
Encrypted secrets (use sops)
image.pollinations.ai/src/createAndReturnImages.ts
Model handlers
shared/registry/image.ts
Pricing, provider, aliases, description

文件用途
image.pollinations.ai/.env
API密钥、端点
image.pollinations.ai/secrets/env.json
加密的密钥(使用sops)
image.pollinations.ai/src/createAndReturnImages.ts
模型处理器
shared/registry/image.ts
定价、服务商、别名、描述

Quick Actions

快速操作

Action
.env
Config/HandlerRegistry
New model✅ (pricing!)
Change endpoint only--
Change provider✅ (pricing!)
Make paid-only--✅ (
paidOnly: true
)
Disable model-✅ (remove)✅ (remove)

操作
.env
Config/Handler注册表
新增模型✅(需设置定价!)
仅修改端点--
修改服务商✅(需设置定价!)
设置为仅付费可用--✅(
paidOnly: true
禁用模型-✅(移除配置)✅(移除记录)

Secrets (sops)

密钥管理(sops)

bash
sops -d <service>/secrets/env.json > /tmp/plain.json
bash
sops -d <service>/secrets/env.json > /tmp/plain.json

Edit with jq or manually

使用jq或手动编辑

cp /tmp/plain.json <service>/secrets/env.json sops -e -i <service>/secrets/env.json rm /tmp/plain.json
undefined
cp /tmp/plain.json <service>/secrets/env.json sops -e -i <service>/secrets/env.json rm /tmp/plain.json
undefined