Skip to content

Conversation

binbinsh
Copy link

@binbinsh binbinsh commented Aug 15, 2025

To support model providers (e.g. Poe API) or models that does not support tool use.

  • Introduced a new "toolUse" configuration in config.json to support tool/function calls.
  • Enhanced the router logic in router.ts to handle tool use routing, including checks for ongoing tool conversations.
  • Updated README files to document the new "toolUse" feature.
  • Added corresponding UI components and localization for "toolUse" in both English and Chinese.
  • Updated package-lock.json with new dependencies for the UI components.

Example usage:

{
  // ...
  "Providers": [
    // ...
    {
      "name": "lmstudio",
      "api_base_url": "http://localhost:1234/v1/chat/completions",
      "api_key": "not_needed",
      "models": [
        "gpt-oss-20b",
        "gpt-oss-120b"
      ],
      "transformer": {
        "use": [
          ["maxtoken", {"max_tokens": 131072}],
          "enhancetool"
        ]
      }
    },
    {
      "name": "poe",
      "api_base_url": "https://api.poe.com/v1/chat/completions",
      "api_key": "YOUR_POE_API",
      "models": [
        "gpt-5",
        "claude-opus-4.1"
      ],
      "transformer": {
        "use": [
          "cleancache",
          ["tooluse-router", {"toolUseModel": "lmstudio,gpt-oss-20b"}]
        ]
      }
    }
  ],
  "Router": {
    // ...
    // change the tool use model globally
    "toolUse": "lmstudio,gpt-oss-20b"
  }
}

- Introduced a new "toolUse" configuration in config.example.json to support tool/function calls.
- Enhanced the router logic in router.ts to handle tool use routing, including checks for ongoing tool conversations.
- Updated README files to document the new "toolUse" feature.
- Added corresponding UI components and localization for "toolUse" in both English and Chinese.
- Updated package-lock.json with new dependencies for the UI components.
- Added react-colorful version 5.6.1 to the package-lock.json file.
- Updated integrity and peerDependencies for the new package.
- Added a helper function to resolve the tool use model from provider configurations when Router.toolUse is not explicitly set.
- Updated the logic in getUseModel to utilize the new resolution method for determining the appropriate tool use model for both general tools and ongoing tool conversations.
- Improved logging to include the resolved tool use model for better traceability.
@listeng
Copy link

listeng commented Aug 31, 2025

Poe now fully supports tool usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants