Indiko.Blocks.AI.ChatGPT
4.3.1
dotnet add package Indiko.Blocks.AI.ChatGPT --version 4.3.1
NuGet\Install-Package Indiko.Blocks.AI.ChatGPT -Version 4.3.1
<PackageReference Include="Indiko.Blocks.AI.ChatGPT" Version="4.3.1" />
<PackageVersion Include="Indiko.Blocks.AI.ChatGPT" Version="4.3.1" />
<PackageReference Include="Indiko.Blocks.AI.ChatGPT" />
paket add Indiko.Blocks.AI.ChatGPT --version 4.3.1
#r "nuget: Indiko.Blocks.AI.ChatGPT, 4.3.1"
#:package Indiko.Blocks.AI.ChatGPT@4.3.1
#addin nuget:?package=Indiko.Blocks.AI.ChatGPT&version=4.3.1
#tool nuget:?package=Indiko.Blocks.AI.ChatGPT&version=4.3.1
Indiko.Blocks.AI.ChatGPT
An OpenAI-compatible provider for the Indiko AI abstraction layer.
Overview
This package implements the chat, vision, and file analysis interfaces from
Indiko.Blocks.AI.Abstractions on top of the OpenAI SDK.
It is named after ChatGPT because that is its default, but what it speaks is
the OpenAI wire protocol — and several providers speak it. Set Endpoint
and the same block talks to OpenRouter, Azure OpenAI, Together, Groq, or a
local vLLM / llama.cpp server. For plain chat against one model that is the
simplest thing that works, and it is what this option is for.
For OpenRouter specifically, consider
Indiko.Blocks.AI.OpenRouter. This block carries only what the OpenAI schema has room for, so OpenRouter's own fields — provider routing, a fallback model chain, cost accounting, reasoning budgets — have nowhere to go and the SDK drops them silently. A dropped routing constraint is the worst kind of bug: the call succeeds, from the wrong provider, and nothing says so. Point this block at OpenRouter when you want its model selection; use the OpenRouter block when you want its routing.
Key Components
ChatGPTAiBlock(block entry point).ChatGptChatService(IAiChatService).ChatGptVisionService(IAiVisionService).ChatGptFileService(IAiFileService).- Additional classes:
ChatGptOcrProcessorChatGptResponseStreamChatGptImageBatchProcessor
- Options:
ChatGPTOptions
DI Registration Entry Point
ChatGPTAiBlock.ConfigureServices(...) registers:
IAiChatService→ChatGptChatServiceIAiVisionService→ChatGptVisionServiceIAiFileService→ChatGptFileService
Configuration
Configuration section: ChatGPTOptions
Enabled |
false registers nothing. See the caveat below |
Platform |
from AiOptions |
Model |
in the provider's own notation — see below |
ApiKey |
from the secret store, never from source control |
OrganizationId |
OpenAI only; ignored elsewhere |
Endpoint |
base address. Empty means OpenAI |
OpenAI (default):
{
"ChatGPTOptions": {
"Enabled": true,
"Model": "gpt-4o-mini",
"ApiKey": "sk-..."
}
}
OpenRouter:
{
"ChatGPTOptions": {
"Enabled": true,
"Endpoint": "https://openrouter.ai/api/v1",
"Model": "anthropic/claude-sonnet-4.5",
"ApiKey": "sk-or-..."
}
}
Include the version segment in
Endpoint. The SDK appends only the operation path, so a bare host answers 404 on every call — which reads like a broken key and sends you looking in the wrong place.
Model names are passed through untouched. OpenAI names them plainly (
gpt-4o-mini); OpenRouter prefixes the vendor (anthropic/claude-sonnet-4.5,openai/gpt-4o-mini). Guessing at the notation would be a translation nobody asked for.
This block ignores
Temperature,MaxTokensandTopPonAiChatCompletionRequest. They are read from neither the request nor the options — the provider's own defaults apply.Indiko.Blocks.AI.OpenRouterhonours them, so moving a request between the two changes its behaviour.
Runtime Behavior and Caveats
A missing or disabled section registers nothing — it does not throw.
A host that references this package and leaves it unconfigured gets a service
without AI, which is what it asked for; it does not get a service that
refuses to start. Resolve IAiChatService with GetService rather than
GetRequiredService and you can make the feature optional.
Enabled with an empty ApiKey or Model does throw. That is a typo, not
a decision — and a provider answering 401 to everything looks like a broken
feature rather than a broken config.
- The block currently registers chat/vision/file services.
- OCR/response-stream/image-batch classes exist but are not registered by default in the block.
- Model-specific behavior is delegated to the OpenAI client and selected implementation paths.
Minimal Usage
var chat = serviceProvider.GetRequiredService<IAiChatService>();
var response = await chat.ChatAsync(
new AiChatCompletionRequest
{
Messages = new[]
{
new AiChatMessage { Role = "user", Content = "Summarize this text." }
}
},
cancellationToken);
Target Framework
- .NET 10
Related Packages
Indiko.Blocks.AI.AbstractionsIndiko.Blocks.AI.OpenRouter— OpenRouter with its routing, fallbacks and cost accounting intact
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- CommunityToolkit.Diagnostics (>= 8.4.2)
- Indiko.Blocks.AI.Abstractions (>= 4.3.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- OpenAI (>= 2.14.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 4.3.1 | 134 | 10/21/2026 | |
| 4.3.0 | 88 | 10/20/2026 | |
| 4.2.0 | 97 | 10/19/2026 | |
| 4.1.0 | 112 | 10/15/2026 | |
| 4.0.0 | 131 | 10/1/2026 | |
| 3.0.1 | 94 | 9/30/2026 | |
| 3.0.0 | 92 | 9/30/2026 | |
| 2.9.1 | 138 | 8/20/2026 | |
| 2.9.0 | 113 | 8/20/2026 | |
| 2.8.0 | 290 | 5/22/2026 | |
| 2.7.8 | 120 | 5/7/2026 | |
| 2.7.7 | 124 | 5/7/2026 | |
| 2.7.6 | 122 | 4/23/2026 | |
| 2.7.5 | 138 | 4/23/2026 | |
| 2.7.4 | 133 | 4/23/2026 | |
| 2.7.3 | 129 | 4/23/2026 | |
| 2.7.2 | 124 | 4/23/2026 | |
| 2.7.1 | 125 | 4/23/2026 | |
| 2.7.0 | 129 | 4/23/2026 | |
| 2.6.4 | 120 | 4/21/2026 |