@looopy-ai/core 2.1.17 → 2.1.18

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.
@@ -215,7 +215,7 @@ export class LiteLLMProvider {
215
215
  litellmRequest.tools = request.tools.map((tool) => ({
216
216
  type: 'function',
217
217
  function: {
218
- name: tool.id,
218
+ name: getValidToolName(tool.id),
219
219
  description: tool.description,
220
220
  parameters: tool.parameters,
221
221
  },
@@ -377,3 +377,7 @@ export const LiteLLM = {
377
377
  });
378
378
  },
379
379
  };
380
+ const getValidToolName = (toolId) => {
381
+ const match = toolId.match(/^[a-zA-Z0-9_-]+/);
382
+ return match ? match[0] : 'invalid_tool_name';
383
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@looopy-ai/core",
3
- "version": "2.1.17",
3
+ "version": "2.1.18",
4
4
  "description": "RxJS-based AI agent framework",
5
5
  "repository": {
6
6
  "url": "https://github.com/looopy-ai/lib"