![]() |
VOOZH | about |
dotnet add package JD.SemanticKernel.Connectors.OpenAICodex --version 0.1.33
NuGet\Install-Package JD.SemanticKernel.Connectors.OpenAICodex -Version 0.1.33
<PackageReference Include="JD.SemanticKernel.Connectors.OpenAICodex" Version="0.1.33" />
<PackageVersion Include="JD.SemanticKernel.Connectors.OpenAICodex" Version="0.1.33" />Directory.Packages.props
<PackageReference Include="JD.SemanticKernel.Connectors.OpenAICodex" />Project file
paket add JD.SemanticKernel.Connectors.OpenAICodex --version 0.1.33
#r "nuget: JD.SemanticKernel.Connectors.OpenAICodex, 0.1.33"
#:package JD.SemanticKernel.Connectors.OpenAICodex@0.1.33
#addin nuget:?package=JD.SemanticKernel.Connectors.OpenAICodex&version=0.1.33Install as a Cake Addin
#tool nuget:?package=JD.SemanticKernel.Connectors.OpenAICodex&version=0.1.33Install as a Cake Tool
OpenAI Codex session connector for Semantic Kernel.
Provides UseCodexChatCompletion() to wire local Codex CLI OAuth credentials (or an explicit API key) into any Semantic Kernel application without managing tokens manually.
OPENAI_API_KEY → CODEX_TOKEN → ~/.codex/auth.json → interactive device code logincodex login equivalent for .NET applicationsUseCodexChatCompletion() extension methodAddCodexAuthentication() for dependency injectionIModelDiscoveryProvider with known Codex models (o3, o4-mini, codex-mini, GPT-4.1, etc.)netstandard2.0, net8.0, and net10.0dotnet add package JD.SemanticKernel.Connectors.OpenAICodex
using JD.SemanticKernel.Connectors.OpenAICodex;
using Microsoft.SemanticKernel;
var kernel = Kernel.CreateBuilder()
.UseCodexChatCompletion()
.Build();
var kernel = Kernel.CreateBuilder()
.UseCodexChatCompletion(apiKey: "sk-your-openai-api-key")
.Build();
var kernel = Kernel.CreateBuilder()
.UseCodexChatCompletion(CodexModels.O3)
.Build();
services.AddCodexAuthentication(o => o.ApiKey = "sk-...");
// Or from configuration:
services.AddCodexAuthentication(configuration);
// Reads from "CodexSession" section in appsettings.json
using var client = CodexHttpClientFactory.Create();
// Use with any OpenAI-compatible API
The provider checks these sources in order and uses the first valid credential found:
| Priority | Source | Description |
|---|---|---|
| 1 | CodexSessionOptions.ApiKey |
Explicit API key from options/config |
| 2 | CodexSessionOptions.AccessToken |
Explicit OAuth token from options/config |
| 3 | OPENAI_API_KEY env var |
Standard OpenAI environment variable |
| 4 | CODEX_TOKEN env var |
Codex-specific environment variable |
| 5 | ~/.codex/auth.json |
Codex CLI local credentials file |
| 6 | Device code login | Interactive OAuth (when EnableInteractiveLogin = true) |
{
"CodexSession": {
"ApiKey": null,
"Issuer": "https://auth.openai.com",
"ApiBaseUrl": "https://api.openai.com/v1",
"AutoRefreshTokens": true,
"EnableInteractiveLogin": false
}
}
| Option | Type | Default | Description |
|---|---|---|---|
ApiKey |
string? |
null |
Explicit OpenAI API key |
AccessToken |
string? |
null |
Explicit OAuth access token |
CredentialsPath |
string? |
null |
Custom path to auth.json |
Issuer |
string |
https://auth.openai.com |
OAuth issuer URL |
ApiBaseUrl |
string |
https://api.openai.com/v1 |
OpenAI API base URL |
ClientId |
string? |
null |
OAuth client ID for device code flow |
EnableInteractiveLogin |
bool |
false |
Enable interactive device code login |
AutoRefreshTokens |
bool |
true |
Auto-refresh expired tokens |
| Constant | Model ID | Description |
|---|---|---|
CodexModels.O3 |
o3 |
Most capable reasoning model |
CodexModels.O4Mini |
o4-mini |
Fast, cost-effective reasoning |
CodexModels.CodexMini |
codex-mini-latest |
Optimised for code generation |
CodexModels.Gpt4Point1 |
gpt-4.1 |
High-capability general model |
CodexModels.Gpt4Point1Mini |
gpt-4.1-mini |
Fast general model |
CodexModels.Gpt4Point1Nano |
gpt-4.1-nano |
Fastest, most cost-effective |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 1 NuGet packages that depend on JD.SemanticKernel.Connectors.OpenAICodex:
| Package | Downloads |
|---|---|
|
JD.AI.Core
Core library for JD.AI — agents, providers, sessions, tools, orchestration, and event bus. Shared by the TUI, Gateway, and channel adapters. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.33 | 46 | 6/16/2026 |
| 0.1.32 | 45 | 6/16/2026 |
| 0.1.31 | 59 | 6/15/2026 |
| 0.1.30 | 718 | 6/8/2026 |
| 0.1.29 | 91 | 6/8/2026 |
| 0.1.28 | 403 | 6/2/2026 |
| 0.1.27 | 450 | 5/25/2026 |
| 0.1.26 | 638 | 5/18/2026 |
| 0.1.25 | 112 | 5/11/2026 |
| 0.1.24 | 101 | 5/11/2026 |
| 0.1.23 | 117 | 5/4/2026 |
| 0.1.22 | 2,502 | 4/27/2026 |
| 0.1.21 | 408 | 4/20/2026 |
| 0.1.20 | 115 | 4/13/2026 |
| 0.1.19 | 118 | 4/13/2026 |
| 0.1.18 | 2,438 | 4/8/2026 |
| 0.1.17 | 122 | 4/1/2026 |
| 0.1.16 | 111 | 4/1/2026 |
| 0.1.15 | 125 | 3/24/2026 |
| 0.1.14 | 118 | 3/24/2026 |