twinclaw 1.2.1 → 1.2.3

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/core/cli.js CHANGED
@@ -181,17 +181,18 @@ export const handleStartCli = async (argv) => {
181
181
  }
182
182
  if (process.platform === 'win32' && !runInCurrentTerminal) {
183
183
  const { spawn } = await import('node:child_process');
184
- const entryScript = process.execPath;
185
184
  console.log('[TwinClaw] Starting gateway in new window...');
186
185
  const targetCmd = isChat ? 'chat' : '';
187
186
  const title = isChat ? 'TwinClaw Chat' : 'TwinClaw Gateway';
187
+ // Use twinclaw command directly
188
+ const cmdToRun = targetCmd ? `twinclaw ${targetCmd}` : 'twinclaw';
188
189
  const args = [
189
190
  '/c',
190
191
  'start',
191
192
  `""`,
192
193
  'cmd.exe',
193
194
  '/k',
194
- targetCmd ? `"${entryScript}" ${targetCmd}` : `"${entryScript}"`
195
+ cmdToRun
195
196
  ];
196
197
  spawn('cmd.exe', args, {
197
198
  detached: true,
@@ -527,10 +527,12 @@ export class ModelRouter {
527
527
  const startedAt = this.nowFn();
528
528
  const timeoutMs = 60000; // 60 second timeout
529
529
  // For providers that don't support tools well, strip them from the request
530
+ // This includes fallback models that use OpenRouter/StepFun which have tool issues
530
531
  const providerId = this.resolveProviderId(input.config);
531
- const noToolProviders = ['stepfun', 'openrouter'];
532
+ const noToolProviders = ['stepfun', 'openrouter', 'unknown'];
533
+ const isFallbackModel = input.config.id === MODEL_SLOT_IDS.FALLBACK_1 || input.config.id === MODEL_SLOT_IDS.FALLBACK_2;
532
534
  let payload = input.payload;
533
- if (noToolProviders.includes(providerId) && input.payload.tools) {
535
+ if ((noToolProviders.includes(providerId) || isFallbackModel) && input.payload.tools) {
534
536
  payload = { ...input.payload };
535
537
  delete payload.tools;
536
538
  delete payload.tool_choice;
@@ -668,10 +670,12 @@ export class ModelRouter {
668
670
  const responseContentParts = [];
669
671
  const toolCalls = [];
670
672
  // For providers that don't support tools well, strip them from the request
673
+ // This includes fallback models that use OpenRouter/StepFun which have tool issues
671
674
  const providerId = this.resolveProviderId(input.config);
672
- const noToolProviders = ['stepfun', 'openrouter'];
675
+ const noToolProviders = ['stepfun', 'openrouter', 'unknown'];
676
+ const isFallbackModel = input.config.id === MODEL_SLOT_IDS.FALLBACK_1 || input.config.id === MODEL_SLOT_IDS.FALLBACK_2;
673
677
  let payload = input.payload;
674
- if (noToolProviders.includes(providerId) && input.payload.tools) {
678
+ if ((noToolProviders.includes(providerId) || isFallbackModel) && input.payload.tools) {
675
679
  payload = { ...input.payload };
676
680
  delete payload.tools;
677
681
  delete payload.tool_choice;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twinclaw",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Eagle-eyed agentic AI gateway with multi-modal hooks and proactive memory.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {