Class ProviderToolNameChatClient
- Namespace
- Oscova.Agents.Middleware
- Assembly
- Oscova.Agents.dll
Sends the model provider an ASCII alias for every tool name it would reject and maps the provider's calls back.
public sealed class ProviderToolNameChatClient : DelegatingChatClient, IChatClient, IDisposableInheritance
-
DelegatingChatClient
Implements
-
IChatClient
Inherited Members
-
DelegatingChatClient.Dispose()DelegatingChatClient.GetResponseAsync(IEnumerable<ChatMessage>, ChatOptions?, CancellationToken)DelegatingChatClient.GetStreamingResponseAsync(IEnumerable<ChatMessage>, ChatOptions?, CancellationToken)DelegatingChatClient.GetService(Type, object?)
Remarks
OpenAI-compatible and Gemini providers accept only function names that start with a letter or underscore and use
[A-Za-z0-9_-], up to 64 characters. Tool names keep their real form everywhere else (settings, approval
policies, governance, history), so an MCP server named Café works without changing any stored name.
Constructors
- ProviderToolNameChatClient(IChatClient)
-
Sends the model provider an ASCII alias for every tool name it would reject and maps the provider's calls back.
Methods
- GetResponseAsync(IEnumerable<ChatMessage>, ChatOptions?, CancellationToken)
-
Sends chat messages and returns the response.
- GetStreamingResponseAsync(IEnumerable<ChatMessage>, ChatOptions?, CancellationToken)
-
Sends chat messages and streams the response.