@luffysolution/omnischolar-pi 0.1.20 → 0.1.21

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.
@@ -94,7 +94,9 @@ Vertex AI can use a service-account JSON file:
94
94
 
95
95
  The service-account file is used locally to obtain an OAuth token and is never written to output artifacts. If `project` is omitted, OmniScholar reads `project_id` from the JSON; `location` defaults to `global`. Model availability still depends on project permissions, location, and model publication status.
96
96
 
97
- Atlas, fal, Vertex, and DashScope/Qwen expose different catalog capabilities. Atlas, fal, Vertex, and DashScope/Qwen have small built-in model sets checked against official documentation; custom services still need an exact `baseUrl`, model ID, capability list, and generation or edit endpoint. Do not infer capabilities from the model name or treat a built-in model as an entitlement guarantee.
97
+ Atlas, fal, Vertex, and DashScope/Qwen expose different catalog capabilities. Atlas, fal, Vertex, and DashScope/Qwen have small built-in model sets checked against official documentation; when `modelCatalogEndpoint` is not configured, custom services make a best-effort request to `baseUrl/models`. If a downstream service has no catalog endpoint, or its models lack explicit capability fields, the tool falls back to the explicit model contracts in `models` and never infers image capabilities from a model name.
98
+
99
+ The OpenAI example configuration presets `gpt-image-2`, `gpt-image-2.5-sunburst`, and `gpt-image-2.5-flare`; the Google/Vertex examples preset `gemini-3.1-flash-image`, `gemini-3.1-flash-lite-image`, and `gemini-3-pro-image`. These are model and capability presets, not entitlement guarantees.
98
100
 
99
101
  ## Generate and edit
100
102
 
@@ -109,6 +111,6 @@ Upload only images you may share with the selected service. After files are save
109
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.
110
112
  - Gemini's `apiKeyEnv` must name an environment variable that exists.
111
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.
112
- - Custom services need a working endpoint and model description.
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.
113
115
 
114
116
  Review text, structures, mechanisms, scale, and quantitative labels after generation. **AI images are illustrative drafts, not experimental data, real measurements, or scientific conclusions.**
@@ -94,7 +94,9 @@ Vertex AI 可使用 service-account JSON:
94
94
 
95
95
  服务账号文件只用于本地换取 OAuth token,不会写入输出结果。若省略 `project`,工具会从 JSON 的 `project_id` 自动读取;默认 `location` 为 `global`。模型是否可用仍取决于项目授权、区域和模型发布状态。
96
96
 
97
- Atlas、fal、Vertex、DashScope/Qwen 和自定义服务的模型目录能力不同。Atlas、fal、Vertex、DashScope/Qwen 已提供少量基于官方文档核对的内置模型;自定义服务仍需要准确的 `baseUrl`、模型 ID、功能列表,以及生成或编辑接口。不要只凭模型名填写功能,也不要把内置模型视为账号已开通的保证。
97
+ Atlas、fal、Vertex、DashScope/Qwen 和自定义服务的模型目录能力不同。Atlas、fal、Vertex、DashScope/Qwen 已提供少量基于官方文档核对的内置模型;自定义服务在未配置 `modelCatalogEndpoint` 时会尽力尝试 `baseUrl/models`。如果下游没有模型目录接口,或返回的模型没有明确能力字段,工具会回退到 `models` 中的显式模型合同,不会仅凭模型名推断图片能力。
98
+
99
+ OpenAI 示例配置预设 `gpt-image-2`、`gpt-image-2.5-sunburst` 和 `gpt-image-2.5-flare`;Google/Vertex 示例配置预设 `gemini-3.1-flash-image`、`gemini-3.1-flash-lite-image` 和 `gemini-3-pro-image`。这些是模型 ID 与能力预设,不代表账号已经开通对应模型。
98
100
 
99
101
  ## 生成与编辑
100
102
 
@@ -109,6 +111,6 @@ Atlas、fal、Vertex、DashScope/Qwen 和自定义服务的模型目录能力不
109
111
  - DashScope/Qwen 支持千问 AI 平台的通用原生地址 `https://dashscope.aliyuncs.com/api/v1`,也支持百炼按地域的 workspace 地址,例如 `https://<workspace>.cn-beijing.maas.aliyuncs.com/api/v1`。当填写 `workspace` 和 `region` 时,工具可以自动拼接地域地址。
110
112
  - Gemini 配置中的 `apiKeyEnv` 必须指向已存在的环境变量。
111
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` 会保存到本地。
112
- - 自定义服务必须给出可用的服务地址与模型说明。
114
+ - 自定义服务会自动探测标准 OpenAI 兼容的 `/models`;也可以用 `options.modelCatalogEndpoint` 指定非标准目录地址。目录结果缺少明确 `capabilities`/`supportedCapabilities` 时只展示为未绑定能力,必须在 `models` 中声明 `text-to-image`、`image-to-image` 或 `edit` 后才能调用。
113
115
 
114
116
  生成后仍需人工检查文字、结构、机制、比例和定量描述。**AI 图片是示意草稿,不是实验数据、真实测量或科研结论。**
@@ -132,7 +132,15 @@
132
132
  "apiKeyEnv": null,
133
133
  "baseUrl": "https://api.openai.com/v1",
134
134
  "models": {
135
- "gpt-image-1": {
135
+ "gpt-image-2": {
136
+ "capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
137
+ "paid": true
138
+ },
139
+ "gpt-image-2.5-sunburst": {
140
+ "capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
141
+ "paid": true
142
+ },
143
+ "gpt-image-2.5-flare": {
136
144
  "capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
137
145
  "paid": true
138
146
  }
@@ -144,7 +152,20 @@
144
152
  "apiKey": "",
145
153
  "apiKeyEnv": null,
146
154
  "baseUrl": "https://generativelanguage.googleapis.com/v1beta",
147
- "models": {},
155
+ "models": {
156
+ "gemini-3.1-flash-image": {
157
+ "capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
158
+ "paid": true
159
+ },
160
+ "gemini-3.1-flash-lite-image": {
161
+ "capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
162
+ "paid": true
163
+ },
164
+ "gemini-3-pro-image": {
165
+ "capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
166
+ "paid": true
167
+ }
168
+ },
148
169
  "options": {}
149
170
  },
150
171
  "vertex": {
@@ -154,7 +175,20 @@
154
175
  "credentialsFile": null,
155
176
  "project": null,
156
177
  "location": "global",
157
- "models": {},
178
+ "models": {
179
+ "gemini-3.1-flash-image": {
180
+ "capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
181
+ "paid": true
182
+ },
183
+ "gemini-3.1-flash-lite-image": {
184
+ "capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
185
+ "paid": true
186
+ },
187
+ "gemini-3-pro-image": {
188
+ "capabilities": ["text-to-image", "image-to-image", "edit", "multi-reference"],
189
+ "paid": true
190
+ }
191
+ },
158
192
  "options": {}
159
193
  },
160
194
  "xai": {
@@ -220,6 +254,7 @@
220
254
  }
221
255
  },
222
256
  "options": {
257
+ "modelCatalogEndpoint": null,
223
258
  "generationEndpoint": "images/generations",
224
259
  "editEndpoint": "images/edits"
225
260
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luffysolution/omnischolar-pi",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "Pi MCP bridge for the OmniScholar research toolkit",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -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.20" };
4
+ const CLIENT_INFO = { name: "omnischolar-pi", version: "0.1.21" };
5
5
  export function resultText(result) {
6
6
  return result.content
7
7
  .map((item) => {