twinclaw 1.2.2 → 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.
@@ -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.2",
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": {