@luffysolution/omnischolar-pi 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -111,6 +111,37 @@ Upload only images you may share with the selected service. After files are save
|
|
|
111
111
|
- DashScope/Qwen supports the Qwen AI Platform native endpoint `https://dashscope.aliyuncs.com/api/v1` and regional Bailian workspace endpoints such as `https://<workspace>.cn-beijing.maas.aliyuncs.com/api/v1`. When `workspace` and `region` are supplied, the tool can derive the regional endpoint.
|
|
112
112
|
- Gemini's `apiKeyEnv` must name an environment variable that exists.
|
|
113
113
|
- Atlas Cloud uses `https://api.atlascloud.ai/api/v1`, submits to `model/generateImage`, and polls `model/prediction/{id}`. The built-in set includes official Nano Banana 2, GPT Image 2, and GPT Image 2.5 Flare/Sunburst IDs. Atlas image tasks are asynchronous and their `outputs` are saved locally.
|
|
114
|
-
- Custom services automatically probe the standard OpenAI-compatible `/models` endpoint, or use `options.modelCatalogEndpoint` for a non-standard catalog URL. If the catalog lacks explicit `capabilities`/`supportedCapabilities`, declare `text-to-image`, `image-to-image`, or `edit` in `models` before calling it.
|
|
114
|
+
- Custom services automatically probe the standard OpenAI-compatible `/models` endpoint, or use `options.modelCatalogEndpoint` for a non-standard catalog URL. If the catalog lacks explicit `capabilities`/`supportedCapabilities`, declare `text-to-image`, `image-to-image`, or `edit` in `models` before calling it. Custom image requests default to a 180-second timeout and can be adjusted with `options.imageTimeoutSeconds` up to 1800 seconds.
|
|
115
|
+
|
|
116
|
+
Multiple custom profiles can be configured under `media.providers`. Profile names may differ, but each must set `providerType: "custom"`; every profile has its own `apiKeyEnv`, `baseUrl`, model capabilities, and `supportedParameters`. Select the profile by its provider name when calling the tool. Common OpenAI/Gemini-compatible image endpoints are `images/generations` and `images/edits`; override them with `generationEndpoint` and `editEndpoint` when needed.
|
|
117
|
+
|
|
118
|
+
For example, keep separate keys for two model families:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"custom-aixoras-openai": {
|
|
123
|
+
"providerType": "custom",
|
|
124
|
+
"apiKeyEnv": "OMNISCHOLAR_AIXORAS_OPENAI_API_KEY",
|
|
125
|
+
"baseUrl": "https://api.aixoras.com/v1",
|
|
126
|
+
"models": {
|
|
127
|
+
"gpt-image-2": {
|
|
128
|
+
"capabilities": ["text-to-image", "image-to-image", "edit"],
|
|
129
|
+
"supportedParameters": ["size", "resolution", "background", "outputFormat", "quality", "n"]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"custom-aixoras-gemini": {
|
|
134
|
+
"providerType": "custom",
|
|
135
|
+
"apiKeyEnv": "OMNISCHOLAR_AIXORAS_GEMINI_API_KEY",
|
|
136
|
+
"baseUrl": "https://api.aixoras.com/v1",
|
|
137
|
+
"models": {
|
|
138
|
+
"gemini-3.1-flash-image": {
|
|
139
|
+
"capabilities": ["text-to-image", "image-to-image", "edit"],
|
|
140
|
+
"supportedParameters": ["size", "resolution", "background", "outputFormat", "quality", "n"]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
115
146
|
|
|
116
147
|
Review text, structures, mechanisms, scale, and quantitative labels after generation. **AI images are illustrative drafts, not experimental data, real measurements, or scientific conclusions.**
|
package/docs/IMAGE_PROVIDERS.md
CHANGED
|
@@ -111,6 +111,37 @@ Atlas、fal、Vertex、DashScope/Qwen 和自定义服务的模型目录能力不
|
|
|
111
111
|
- DashScope/Qwen 支持千问 AI 平台的通用原生地址 `https://dashscope.aliyuncs.com/api/v1`,也支持百炼按地域的 workspace 地址,例如 `https://<workspace>.cn-beijing.maas.aliyuncs.com/api/v1`。当填写 `workspace` 和 `region` 时,工具可以自动拼接地域地址。
|
|
112
112
|
- Gemini 配置中的 `apiKeyEnv` 必须指向已存在的环境变量。
|
|
113
113
|
- Atlas Cloud 使用 `https://api.atlascloud.ai/api/v1`、`model/generateImage` 提交和 `model/prediction/{id}` 轮询;默认内置 Nano Banana 2、GPT Image 2、GPT Image 2.5 Flare/Sunburst 的官方模型 ID。Atlas 的图片任务是异步的,结果中的 `outputs` 会保存到本地。
|
|
114
|
-
- 自定义服务会自动探测标准 OpenAI 兼容的 `/models`;也可以用 `options.modelCatalogEndpoint` 指定非标准目录地址。目录结果缺少明确 `capabilities`/`supportedCapabilities` 时只展示为未绑定能力,必须在 `models` 中声明 `text-to-image`、`image-to-image` 或 `edit` 后才能调用。
|
|
114
|
+
- 自定义服务会自动探测标准 OpenAI 兼容的 `/models`;也可以用 `options.modelCatalogEndpoint` 指定非标准目录地址。目录结果缺少明确 `capabilities`/`supportedCapabilities` 时只展示为未绑定能力,必须在 `models` 中声明 `text-to-image`、`image-to-image` 或 `edit` 后才能调用。custom 图片请求默认超时为 180 秒,可用 `options.imageTimeoutSeconds` 调整(上限 1800 秒)。
|
|
115
|
+
|
|
116
|
+
可以在 `media.providers` 下配置多个 custom profile。profile 名称可以不同,但必须设置 `providerType: "custom"`;每个 profile 独立填写 `apiKeyEnv`、`baseUrl`、模型能力和 `supportedParameters`,调用时用对应 profile 名称选择服务。OpenAI/Gemini 兼容中转站常见的图片 endpoint 是 `images/generations` 和 `images/edits`,可通过 `generationEndpoint`、`editEndpoint` 调整。
|
|
117
|
+
|
|
118
|
+
例如两个 API 分开配置:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"custom-aixoras-openai": {
|
|
123
|
+
"providerType": "custom",
|
|
124
|
+
"apiKeyEnv": "OMNISCHOLAR_AIXORAS_OPENAI_API_KEY",
|
|
125
|
+
"baseUrl": "https://api.aixoras.com/v1",
|
|
126
|
+
"models": {
|
|
127
|
+
"gpt-image-2": {
|
|
128
|
+
"capabilities": ["text-to-image", "image-to-image", "edit"],
|
|
129
|
+
"supportedParameters": ["size", "resolution", "background", "outputFormat", "quality", "n"]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"custom-aixoras-gemini": {
|
|
134
|
+
"providerType": "custom",
|
|
135
|
+
"apiKeyEnv": "OMNISCHOLAR_AIXORAS_GEMINI_API_KEY",
|
|
136
|
+
"baseUrl": "https://api.aixoras.com/v1",
|
|
137
|
+
"models": {
|
|
138
|
+
"gemini-3.1-flash-image": {
|
|
139
|
+
"capabilities": ["text-to-image", "image-to-image", "edit"],
|
|
140
|
+
"supportedParameters": ["size", "resolution", "background", "outputFormat", "quality", "n"]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
115
146
|
|
|
116
147
|
生成后仍需人工检查文字、结构、机制、比例和定量描述。**AI 图片是示意草稿,不是实验数据、真实测量或科研结论。**
|
|
@@ -210,34 +210,41 @@
|
|
|
210
210
|
"baseUrl": "https://images.example.edu/v1",
|
|
211
211
|
"models": {
|
|
212
212
|
"gpt-image-2": {
|
|
213
|
-
"capabilities": ["text-to-image"],
|
|
213
|
+
"capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
|
|
214
|
+
"supportedParameters": ["size", "resolution", "background", "outputFormat", "quality", "n"],
|
|
214
215
|
"paid": true
|
|
215
216
|
},
|
|
216
217
|
"gpt-image-2.5-sunburst": {
|
|
217
|
-
"capabilities": ["text-to-image"],
|
|
218
|
+
"capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
|
|
219
|
+
"supportedParameters": ["size", "resolution", "background", "outputFormat", "quality", "n"],
|
|
218
220
|
"paid": true
|
|
219
221
|
},
|
|
220
222
|
"gpt-image-2.5-flare": {
|
|
221
|
-
"capabilities": ["text-to-image"],
|
|
223
|
+
"capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
|
|
224
|
+
"supportedParameters": ["size", "resolution", "background", "outputFormat", "quality", "n"],
|
|
222
225
|
"paid": true
|
|
223
226
|
},
|
|
224
227
|
"gemini-3.1-flash-image": {
|
|
225
|
-
"capabilities": ["text-to-image"],
|
|
228
|
+
"capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
|
|
229
|
+
"supportedParameters": ["size", "resolution", "background", "outputFormat", "quality", "n"],
|
|
226
230
|
"paid": true
|
|
227
231
|
},
|
|
228
232
|
"gemini-3.1-flash-lite-image": {
|
|
229
|
-
"capabilities": ["text-to-image"],
|
|
233
|
+
"capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
|
|
234
|
+
"supportedParameters": ["size", "resolution", "background", "outputFormat", "quality", "n"],
|
|
230
235
|
"paid": true
|
|
231
236
|
},
|
|
232
237
|
"gemini-3-pro-image": {
|
|
233
|
-
"capabilities": ["text-to-image"],
|
|
238
|
+
"capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
|
|
239
|
+
"supportedParameters": ["size", "resolution", "background", "outputFormat", "quality", "n"],
|
|
234
240
|
"paid": true
|
|
235
241
|
}
|
|
236
242
|
},
|
|
237
243
|
"options": {
|
|
238
244
|
"modelCatalogEndpoint": null,
|
|
239
245
|
"generationEndpoint": "images/generations",
|
|
240
|
-
"editEndpoint": "images/edits"
|
|
246
|
+
"editEndpoint": "images/edits",
|
|
247
|
+
"imageTimeoutSeconds": 180
|
|
241
248
|
}
|
|
242
249
|
}
|
|
243
250
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
2
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
3
3
|
import { Type } from "typebox";
|
|
4
|
-
const CLIENT_INFO = { name: "omnischolar-pi", version: "0.1.
|
|
4
|
+
const CLIENT_INFO = { name: "omnischolar-pi", version: "0.1.24" };
|
|
5
5
|
export function resultText(result) {
|
|
6
6
|
return result.content
|
|
7
7
|
.map((item) => {
|