Skip to content

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

feat(llm): add onomeo provider

Owaid0723666ef5e862879df
diff --git a/app/models/llm_provider.py b/app/models/llm_provider.py
index 2ade9e95..5d1c33b6 100644
--- a/app/models/llm_provider.py
+++ b/app/models/llm_provider.py
@@ -499,6 +499,14 @@ LLM_PROVIDER_REGISTRY = (
default_base_url="https://api.opper.ai/v3/compat",
model_docs_url="https://opper.ai/models",
),
+ LLMProviderSpec(
+ "onomeo",
+ "onomeo",
+ api_key_url="https://onomeo.com/dashboard",
+ default_model="auto",
+ default_base_url="https://onomeo.com/v1",
+ model_docs_url="https://onomeo.com/models",
+ ),
# 本地部署与通用网关
LLMProviderSpec(
"ollama",
diff --git a/config.example.toml b/config.example.toml
index 8e078f1a..4d2f1265 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -301,6 +301,13 @@ opper_api_key = ""
opper_base_url = ""
opper_model_name = ""
+# onomeo, a small OpenAI-compatible LLM gateway with a free model tier.
+# API key: https://onomeo.com/dashboard
+# Model list: https://onomeo.com/models
+onomeo_api_key = ""
+onomeo_base_url = ""
+onomeo_model_name = ""
+
# OpenAI or another OpenAI Chat Completions-compatible provider.
# API key: https://platform.openai.com/api-keys
openai_api_key = ""
diff --git a/test/services/test_llm.py b/test/services/test_llm.py
index 3a9e33b3..2e043693 100644
--- a/test/services/test_llm.py
+++ b/test/services/test_llm.py
@@ -421,6 +421,13 @@ class TestLiteLLMProvider(unittest.TestCase):
self.assertTrue(opper.requires_api_key)
self.assertEqual(opper.api_key_url, "https://platform.opper.ai")
self.assertEqual(opper.model_docs_url, "https://opper.ai/models")
+ onomeo = get_llm_provider("onomeo")
+ self.assertEqual(onomeo.default_model, "auto")
+ self.assertEqual(onomeo.default_base_url, "https://onomeo.com/v1")
+ self.assertEqual(onomeo.adapter, "openai_compatible")
+ self.assertTrue(onomeo.requires_api_key)
+ self.assertEqual(onomeo.api_key_url, "https://onomeo.com/dashboard")
+ self.assertEqual(onomeo.model_docs_url, "https://onomeo.com/models")
iflytek = get_llm_provider("iflytek")
self.assertEqual(iflytek.default_model, "spark-x2.5")
self.assertEqual(
@@ -496,6 +503,7 @@ class TestLiteLLMProvider(unittest.TestCase):
"futureinfra",
"yapi",
"opper",
+ "onomeo",
"ollama",
"claude_code",
"oneapi",
diff --git a/test/services/test_webui_i18n.py b/test/services/test_webui_i18n.py
index c9525e9c..5a88bce9 100644
--- a/test/services/test_webui_i18n.py
+++ b/test/services/test_webui_i18n.py
@@ -54,6 +54,7 @@ ENGLISH_FALLBACK_KEYS = frozenset(
"llm_provider_label.futureinfra",
"llm_provider_label.yapi",
"llm_provider_label.opper",
+ "llm_provider_label.onomeo",
"llm_provider_label.shengsuanyun",
"llm_provider_label.kimi_code",
"kimi_code.oauth.login",
diff --git a/webui/i18n/en.json b/webui/i18n/en.json
index 810e0d12..96fccdc0 100644
--- a/webui/i18n/en.json
+++ b/webui/i18n/en.json
@@ -245,6 +245,8 @@
"llm_provider_tips.yapi": "##### Y-API Configuration\n- **API Key**: Create an API key in the [Y-API console]({api_key_url})\n- **Base Url**: Defaults to `{default_base_url}`\n- **Model Name**: Defaults to `{default_model}`; see the [model list]({model_docs_url}) for other model IDs in `vendor/model` form\n\nY-API is an OpenAI-compatible gateway: one API key serves models from several labs, and it also exposes an Anthropic-compatible `/v1/messages` endpoint.",
"llm_provider_label.opper": "Opper",
"llm_provider_tips.opper": "##### Opper Configuration\n- **API Key**: Create an API key at [Opper]({api_key_url})\n- **Base Url**: Defaults to `{default_base_url}`\n- **Model Name**: Defaults to `{default_model}`; see the [model list]({model_docs_url}) for other model IDs\n\nOpper is an EU-hosted, OpenAI-compatible gateway to 700+ models from 50+ providers.",
+ "llm_provider_label.onomeo": "onomeo",
+ "llm_provider_tips.onomeo": "##### onomeo Configuration\n- **API Key**: Sign in and create an API key at [onomeo]({api_key_url})\n- **Base Url**: Defaults to `{default_base_url}`\n- **Model Name**: Defaults to `{default_model}`, which picks a working free model; see the [model list]({model_docs_url}) for other model IDs\n\nonomeo is an OpenAI-compatible gateway. Free models are rate limited; other models are charged from a prepaid balance.",
"API Key": "API Key",
"Base Url": "Base Url",
"Account ID": "Account ID",
diff --git a/webui/i18n/zh.json b/webui/i18n/zh.json
index 79a281e1..c0972bb1 100644
--- a/webui/i18n/zh.json
+++ b/webui/i18n/zh.json
@@ -245,6 +245,8 @@
"llm_provider_tips.yapi": "##### Y-API 配置说明\n- **API Key**: 在 [Y-API 控制台]({api_key_url}) 创建 API Key\n- **Base Url**: 默认 `{default_base_url}`\n- **Model Name**: 默认 `{default_model}`;其它 `vendor/model` 格式的模型 ID 见 [模型列表]({model_docs_url})\n\nY-API 是兼容 OpenAI 接口的多模型网关,一个 API Key 可调用多家厂商的模型,同时提供兼容 Anthropic 的 `/v1/messages` 接口。",
"llm_provider_label.opper": "Opper",
"llm_provider_tips.opper": "##### Opper 配置说明\n- **API Key**: 在 [Opper]({api_key_url}) 创建 API Key\n- **Base Url**: 默认 `{default_base_url}`\n- **Model Name**: 默认 `{default_model}`;可在 [模型列表]({model_docs_url}) 查看其它模型 ID\n\nOpper 是部署在欧盟、兼容 OpenAI 接口的多模型网关,可调用 50 多家厂商的 700 多个模型。",
+ "llm_provider_label.onomeo": "onomeo",
+ "llm_provider_tips.onomeo": "##### onomeo 配置说明\n- **API Key**: 登录后在 [onomeo]({api_key_url}) 创建 API Key\n- **Base Url**: 默认 `{default_base_url}`\n- **Model Name**: 默认 `{default_model}`,会自动选择可用的免费模型;其它模型 ID 可在 [模型列表]({model_docs_url}) 查看\n\nonomeo 是兼容 OpenAI 接口的网关。免费模型有调用频率限制,其它模型按预付余额计费。",
"API Key": "API Key",
"Base Url": "Base Url",
"Account ID": "Account ID",