Skip to content

[BUG] Toolkit name with spaces causes invalid_request_error during agent execution #2073

@SamvelSimonyan

Description

@SamvelSimonyan

Steps to reproduce:

  1. Connect an MCP server to Alita.
  2. Create a toolkit and include a space in the toolkit name (e.g., "Toolkit Name").
  3. Execute an agent using the created toolkit.

Actual results:

  • The following error is displayed:
    openai.BadRequestError: Error code: 400 - {'error': {'message': "litellm.BadRequestError: AzureException BadRequestError - Invalid 'tools[0].function.name': string does not match pattern. Expected a string that matches the pattern '^[a-zA-Z0-9_\\.-]+$'.. Received Model Group=1_gpt-4o-mini\nAvailable Model Group Fallbacks=None", 'type': 'invalid_request_error', 'param': 'tools[0].function.name', 'code': '400'}}  
    
    
Image



**Expected results:**  
- The toolkit should execute successfully without any errors, even if the toolkit name contains spaces.

Metadata

Metadata

Assignees

Labels

MCPTo group issues regarding MCP functionality

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions