The best AI for C# programming: choosing a model and setting up an agent

We give no ranking of the best model for C#, but we show how to compare options by price and index, set up an agent for .NET and verify the result with builds and tests.

5 min · · development · models

The question "which AI is best for C# programming" has no universal answer, and it is more honest to say so up front. We have no measurements of our own on .NET code quality, and we will not take someone else's numbers without a source. What we can do is compare models on what is known for sure (price, context, strength index), set up an agent so that it checks itself with builds and tests, and pick a model on your own tasks. That is what we cover.

The best AI for C# programming: how to approach the choice

What to consider when choosing an AI for C# programming:

  1. Type of tasks. Routine (DTOs, mappers, tests, porting code between language versions) and hard work (async code, multithreading, architecture) place different demands.
  2. Project size. A solution of dozens of projects is limited by context, not only by the model's "smarts". All Claude and GPT models in our catalogue have a 1M-token context, GLM 5.3 and GLM 5.3 Flash have 128K.
  3. Cost of iterations. An agent makes many calls in a row, and the cost is set by the input and output price, not by a single answer.
  4. The tool. A terminal agent and an IDE extension work differently, which affects how comfortable it is to work with a project.

Zukko prices as of October 18, 2026, $ per 1M tokens. The strength index is the Intelligence Index from Artificial Analysis; we quote no other quality ratings.

ModelInput / outputOfficial input / outputContextIndex
claude-opus-5-50.8 / 44 / 201M58
gpt-6.1-sol0.27 / 1.322 / 101M52
claude-sonnet-5-50.4 / 22 / 101M48
glm-5.30.1 / 0.11.4 / 4.4128K45
deepseek-v4.1-flash0.013 / 0.0380.15 / 0.61M39

The index is general, not "for C#". It shows the order of strength but does not replace a run on your code. The list and prices change: GET https://api.zukko.pro/v1/models or the "Models" page in the dashboard.

An agent for .NET: terminal or IDE

Both modes suit work on a C# solution.

A terminal agent (Claude Code, Codex) sees the whole repository, runs dotnet build and dotnet test itself and reads the output. Connecting to Zukko is described in the Claude Code and Codex documentation. For Codex there is a caveat from our documentation: it works through the Responses API, so GPT and Claude models fit, while GLM models do not work in it.

An IDE extension is convenient for edits within a file. For VS Code these are, for example, Cline or Kilo Code (Roo Code, according to its developers, was shut down on May 15, 2026). JetBrains editors, including Rider, have the built-in AI Assistant; whether you can connect a third-party provider depends on its version, so check the JetBrains documentation.

If you need to call a model from the .NET application itself, see Claude API in C# and .NET.

Rules for the agent

Put an instruction file in the solution root (CLAUDE.md for Claude Code, AGENTS.md for Codex):

bash
## Project
- .NET 8, C# 12, nullable reference types enabled. Do not disable them.
- Tests: xUnit. Do not add new NuGet packages without asking.
- Async methods end with Async and take a CancellationToken.

## Commands
- Build: `dotnet build`
- All tests: `dotnet test`
- One test class: `dotnet test --filter "FullyQualifiedName~OrderServiceTests"`
- Style check: `dotnet format --verify-no-changes`

## Boundaries
- Do not change .csproj or global.json unless asked.
- Before saying "done": build with no warnings and green tests.

Substitute your own versions. The dotnet build, dotnet test and dotnet format commands ship with the standard .NET SDK, but the set of options depends on the SDK version, so check Microsoft's documentation for yours.

A small example of what you can ask: "write xUnit tests for OrderService.CalculateTotalAsync without changing the service". The result looks like this:

bash
public class OrderServiceTests
{
    [Fact]
    public async Task CalculateTotalAsync_EmptyOrder_ReturnsZero()
    {
        var repo = new FakeOrderRepository(items: Array.Empty<OrderItem>());
        var service = new OrderService(repo);

        var total = await service.CalculateTotalAsync(orderId: 1, CancellationToken.None);

        Assert.Equal(0m, total);
    }

    [Theory]

The code is illustrative: the OrderService and FakeOrderRepository classes in your project may look different. Read generated tests by eye and check that they fail on broken logic.

Codex and Unity

The query "codex unity" means a console agent working on a game's C# scripts. What to know:

  • Unity compiles scripts inside the editor. A terminal agent will not see compile errors until you give it a way to get them: for example, running Unity without a window (-batchmode, -quit, -projectPath, -logFile). Exact switches and behavior depend on the editor version, so check Unity's documentation.
  • .meta files are tied to assets. Ask the agent not to delete or rename files without you: broken references in scenes are hard to find.
  • Give the agent scripts and tests, and keep scene and prefab work for yourself.
  • For Codex, GPT and Claude models fit (per Zukko documentation, GLM does not work in it).

Calculation: an agent work session

Assumption: 25 steps per session, each with 30,000 input tokens and 1,500 output tokens. Input: 30,000 × 25 steps = 750,000, output: 1,500 × 25 steps = 37,500.

  • claude-opus-5-5: 0.75 × $0.8 + 0.0375 × $4 = $0.60 + $0.15 = $0.75.
  • claude-sonnet-5-5: 0.75 × $0.4 + 0.0375 × $2 = $0.30 + $0.075 = $0.375.
  • gpt-6.1-sol: 0.75 × $0.27 + 0.0375 × $1.32 = $0.2025 + $0.0495 = $0.252.
  • deepseek-v4.1-flash: 0.75 × $0.013 + 0.0375 × $0.038 = $0.00975 + $0.001425 = $0.011175 (about one cent).

This calculation ignores cache. Agents on the Anthropic format get cheap cache reads, while in the OpenAI format all Claude input is billed at the input price; more on the key limits and cache page. The practical takeaway: pick 5-10 of your typical tasks, run them on two or three models, and compare the result and actual spend in the "Usage" section of the dashboard. Create the key in the dashboard; the dollar balance is topped up from $1 via SBP (the payment page adds 8.5% on top), crypto or a MasterCard card.

FAQ

Which model writes the best C#?

We do not rank models by code quality. Use price, context and strength index as guides and check the options on your own tasks.

Is a cheap model enough for .NET?

For routine work (DTOs, simple tests, renames) often yes, but verify the result with a build and tests. Compare complex async code against a stronger model on your examples.

Can I use this for Unity?

Yes, for scripts and tests, but the agent needs a way to get compile errors, and .meta files are best protected with a rule in the instructions. Check Unity's documentation for details on running it without a window.

Which base URL should I use?

For Claude Code https://api.zukko.pro without /v1; for OpenAI-compatible clients, including Codex, https://api.zukko.pro/v1.

zukko

Pay 25×
less

for Claude Code & ChatGPT

One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.

Get API keyDocumentation

api.zukko.pro · fetch_*

Best AI for C# programming: choose and set up · Zukko