@fxz26284407/yuanma-gateway 0.1.9 → 0.1.10

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.
package/dist/deepseek.js CHANGED
@@ -538,7 +538,7 @@ export class DeepSeekBackend {
538
538
  await this.inspect(projectId, id);
539
539
  requireValue(serviceTier === undefined, 'INVALID_MODEL', 'Harness 没有 Fast 档位', 400);
540
540
  const entry = (await this.listModels()).find(m => m.model === model);
541
- requireValue(entry && (entry.efforts.length ? entry.efforts.includes(effort) : effort === ''), 'INVALID_MODEL', '模型或思考深度不可用', 400);
541
+ requireValue(entry && (entry.efforts.includes(effort) || (effort === '' && entry.defaultEffort === '')), 'INVALID_MODEL', '模型或思考深度不可用', 400);
542
542
  const [provider, nativeModel] = JSON.parse(entry.model);
543
543
  const result = await this.call('session/selectModel', { request: { sessionId: id, provider, model: nativeModel, ...(effort ? { reasoningEffort: effort } : {}) } });
544
544
  const applied = this.selectionView(result.selected);
package/dist/server.js CHANGED
@@ -647,7 +647,7 @@ export async function startGateway(options) {
647
647
  const projectId = text(data.projectId, 'projectId');
648
648
  allowed(projectId, actor, true);
649
649
  requireValue(current().backend.setModel, 'UNSUPPORTED_COMMAND', 'Model settings unavailable', 503);
650
- return current().backend.setModel(projectId, text(data.threadId, 'threadId'), text(data.model, 'model'), text(data.effort, 'effort'), data.serviceTier);
650
+ return current().backend.setModel(projectId, text(data.threadId, 'threadId'), text(data.model, 'model'), data.effort === '' ? '' : text(data.effort, 'effort'), data.serviceTier);
651
651
  }
652
652
  if (req.method === 'POST' && path === '/v1/questions/reply') {
653
653
  const projectId = text(data.projectId, 'projectId');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fxz26284407/yuanma-gateway",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": "22.x"