Skip to content

🐛 OpenRouter Integration Broken - MCP Schema + Qwen Support #22

@RobLe3

Description

@RobLe3

🐛 Problem

OpenRouter integration fails preventing cost optimization and 1M free Qwen token usage.

🔍 Issues

1. MCP Schema Validation Errors (affects all OpenRouter models):

Invalid schema for function 'mcp__flow-nexus__neural_predict': array schema missing items

2. Qwen Tool Support Missing (affects qwen models):

No endpoints found that support tool use

📋 Reproduction

# Schema errors with tool-capable models
npx agentic-flow --agent coder --task "test" --provider openrouter --model "openai/gpt-4o-mini"

# Tool support errors with Qwen models  
npx agentic-flow --agent coder --task "test" --provider openrouter --model "qwen/qwen-2.5-coder-32b-instruct"

🔧 Fix Required

  1. Update MCP schemas to include items for array properties
  2. Implement tool emulation for Qwen models (similar to 🔧 Tool Emulation for Non-Tool Models - Phase 2 Integration #8)

💰 Impact

Blocks 99% cost savings and 1M free Qwen token usage - core value proposition of OpenRouter integration.

🎯 Success Criteria

  • Tool-capable models work via OpenRouter
  • Qwen models work via tool emulation
  • Cost optimization achievable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions