[BUG] Tools whose sanitized name starts with a digit crash every provider's tool conversion before the LLM call
Los mantenedores suelen responder en 1 día
@HhH666-ux ya está trabajando en esto.
Desde el 8/11/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- backend-api-design
Línea de trabajo
Start with sanitize_tool_name() in lib/crewai/src/crewai/utilities/string_utils.py, then trace how its result reaches validate_function_name() in lib/crewai/src/crewai/llms/providers/utils/common.py. Reproduce the failure using the offline example in the issue and inspect related tool conversion code in lib/crewai/src/crewai/utilities/agent_utils.py. Done means digit-leading sanitized names pass conversion while ordinary names still work; two open pull requests already address this issue.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug Description
sanitize_tool_name() (lib/crewai/src/crewai/utilities/string_utils.py) lowercases, strips disallowed characters, and removes leading underscores — but it happily returns a name starting with a digit: '3D Renderer' → '3d_renderer', '2FA Verifier' → '2fa_verifier'.
convert_tools_to_openai_schema() (lib/crewai/src/crewai/utilities/agent_utils.py:292) builds every provider's tool schema from that sanitized name, and safe_tool_conversion() → validate_function_name() (lib/crewai/src/crewai/llms/providers/utils/common.py:25) then rejects it:
ValueError: OpenAI function name '3d_renderer' must start with a letter or underscore
This happens locally, before any HTTP request, on every function-calling run for such tools — openai, azure, anthropic, bedrock and gemini all funnel through safe_tool_conversion. Meanwhile OpenAI/Anthropic/Bedrock's published name specs (^[a-zA-Z0-9_-]{1,64}$-style) all allow leading digits, so the sanitizer creates a name the providers would accept but crewAI's own validator refuses.
Steps to Reproduce
Offline, no API key — the failing path is sanitize_tool_name + safe_tool_conversion:
from crewai.utilities.string_utils import sanitize_tool_name
from crewai.utilities.agent_utils import convert_tools_to_openai_schema
class T:
name = "3D Renderer"
description = "renders"
args_schema = None
parameters_verify_mode = None
max_usage_count = None
convert_tools_to_openai_schema([T()]) # ValueError
Tools named '3D Renderer', '2024 Sales Analyzer', '2FA Verifier' all crash; a normal name is unaffected.
Expected behavior
The sanitized name should be usable by every provider's validator — e.g. prefix an underscore when the sanitized result starts with a digit ('3d_renderer' → '_3d_renderer'), consistent with how the MCP tool resolver already prefixes mcp_ to satisfy the same validation.
Screenshots/Code snippets
sanitize_tool_name("3D Renderer") # '3d_renderer' -> validate_function_name raises
sanitize_tool_name("2024 Sales Analyzer") # '2024_sales_analyzer' -> raises
sanitize_tool_name("get_weather") # 'get_weather' -> fine
Operating System
Windows 11
Python Version
3.12
crewAI Version
main 2fba413 (1.15.x)
- Lenguaje dominante
- Python
- Estrellas
- 60.6k
- Forks
- 9.1k
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 218
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de crewAIInc/crewAI
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Feature request: GoldenDirectiveTool (harmonic relationship score, full vs cropped reporting)Abiertofeature-request
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
crewAIInc/crewAI#9200 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[FEATURE] Docs: ApifyActorsTool example with a typed-input ActorPosiblemente ocupada @johnisanerd la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
crewAIInc/crewAI#9132 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
[BUG] Scrape tools reject the documented cookies mapping and drop cookies when the URL is passed at runtimePosiblemente ocupada @Luckyou-d la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
[BUG] OpenAI-compatible embedding model alias breaks embedder constructionPosiblemente ocupada @gokay-ai la tomó hace 13 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
crewAIInc/crewAI#8761 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de crewAIInc/crewAI
Issues similares
-
physical
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
antonyrag/ragleap-core#1339 ·
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
AllenCell/SubCellSeg#5 ·
-
[🐛 Bug]: oidc_authverifier.py strips trailing slash causing "Invalid token: Invalid issuer" errorAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
keephq/keep#6934 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
bug game: 01008BA02525A000 ios
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 87/100
gke-labs/kube-agents#5501 ·
Los mantenedores suelen responder en 1 día