Using Chinese MCP service/tool names causes function.name pattern error after recent update #7846
Replies: 2 comments 2 replies
-
This is not likely a regression. Either you reverted to the main version release, or your server name is now configured with non-ASCII characters. It would be better to introduce an alternate user-facing name for the server since the main "server name" as understood by the dynamic tool construction and the LLM can be changed at will via the config. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the suggestion! I haven’t found a way to add a separate display field for the MCP server in the current config—could you please share an example or documentation on how to configure a user-facing display name separately from the server name? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I’m following up regarding an issue with using non-ASCII (e.g., Chinese) names for MCP services or tool names in LibreChat. Previously, there was a fix to address the Azure OpenAI function.name pattern error when displaying localized names, but after updating to the latest code, the error has reappeared—even in cases that previously worked.
Issue summary:
When using a Chinese name for an MCP service or tool in the config, calling the OpenAI API fails with:
Invalid 'tools[0].function.name': string does not match pattern. Expected a string that matches the pattern '^[a-zA-Z0-9_.-]+$'.
This error occurs both in Agent Endpoint and regular tool call scenarios.
I also emailed server details as requested in the previous (now closed) issue, but haven’t received a further response so far.
Expected behavior:
Allow users to use localized (e.g., Chinese) display names for tools/MCP services, but ensure only valid ASCII names are sent as function.name in API calls to avoid errors.
The original fix worked, but now there seems to be a regression or the issue is not completely resolved in some scenarios.
Steps to reproduce:
Configure a MCP service/tool with a Chinese name in librechat.yaml.
Use Agent Endpoint or direct tool call.
Error occurs when calling Azure OpenAI via API.
Thank you for your attention and ongoing work on this project! @danny-avila
Beta Was this translation helpful? Give feedback.
All reactions