feat: Implement OpenRouter API client for managing headers and retrieving model pricing.
This commit is contained in:
@@ -88,9 +88,13 @@ AnsiConsole.Write(infoTable);
|
||||
AnsiConsole.WriteLine();
|
||||
|
||||
// ── Build the chat client with tool-calling support ─────────────────────
|
||||
var httpClient = new HttpClient();
|
||||
OpenRouterHeaders.ApplyTo(httpClient);
|
||||
|
||||
var openAiClient = new OpenAIClient(new ApiKeyCredential(apiKey), new OpenAIClientOptions
|
||||
{
|
||||
Endpoint = new Uri(endpoint)
|
||||
Endpoint = new Uri(endpoint),
|
||||
Transport = new System.ClientModel.Primitives.HttpClientPipelineTransport(httpClient)
|
||||
});
|
||||
|
||||
IChatClient innerClient = openAiClient.GetChatClient(model).AsIChatClient();
|
||||
|
||||
Reference in New Issue
Block a user