Added Requesty as a provider

Requesty is an OpenAI compatible AI gateway. The provider mirrors OpenRouter: chat completions over https://router.requesty.ai/v1/, the same project headers, and a model list read from both the managed policies (models/managed) and the full catalog (models), including the context window.
This commit is contained in:
Thibault Jaigu committed 2026-09-25 10:04:02 +01:00
1 parent 4baf21656a
commit fe61acc5b2
15 files changed
+243 -3

No files matched your search

@@ -2,6 +2,7 @@ using System.Text.Json;
using AIStudio.Provider.Groq;
using AIStudio.Provider.OpenRouter;
using AIStudio.Provider.Requesty;
using MistralModelsResponse = AIStudio.Provider.Mistral.ModelsResponse;
using SelfHostedModelsResponse = AIStudio.Provider.SelfHosted.ModelsResponse;
@@ -105,6 +106,19 @@ public sealed class ModelListMetadataTests
Assert.That(response.Data[0].ContextWindowTokens, Is.EqualTo(131_072));
}
[Test]
public void RequestyStatesTheWindowAsTheContextWindow()
{
var response = JsonSerializer.Deserialize<RequestyModelsResponse>("""
{
"object": "list",
"data": [ { "id": "openai/gpt-4o-mini", "object": "model", "api": "chat", "context_window": 128000, "max_output_tokens": 16384 } ]
}
""", AS_THE_PROVIDERS_READ_IT);
Assert.That(response.Data[0].ContextWindowTokens, Is.EqualTo(128_000));
}
[Test]
public void MistralStatesTheWindowAsAMaximumLength()
{