Skip to content
Tracon

AnthropicProviderNames

Namespace Tracon · Assembly Tracon.Anthropic.dll

The provider name registered by UseAnthropic and the ModelBinding.ProviderSettings keys.

public static class AnthropicProviderNames
Inheritance
object ← AnthropicProviderNames
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

These names are stable. Agent definitions are stored in the database under these names; changing them breaks stored definitions.

The provider that uses the Anthropic Messages API: anthropic.

public const string Anthropic = "anthropic"

string

The setting key that sets the model’s effort: anthropic.effort (text: low, medium, high, xhigh or max).

public const string EffortSetting = "anthropic.effort"

string

var binding = new ModelBinding
{
Provider = AnthropicProviderNames.Anthropic,
Model = "your-current-claude-model",
MaxOutputTokens = 64000,
ProviderSettings = new Dictionary<string, JsonElement>
{
[AnthropicProviderNames.EffortSetting] = JsonSerializer.SerializeToElement("high"),
[AnthropicProviderNames.ThinkingModeSetting] = JsonSerializer.SerializeToElement("adaptive"),
[AnthropicProviderNames.PromptCachingSetting] = JsonSerializer.SerializeToElement(true),
[AnthropicProviderNames.PromptCachingTtlSetting] = JsonSerializer.SerializeToElement("1h"),
[AnthropicProviderNames.PromptCachingPlacementSetting] = JsonSerializer.SerializeToElement("system"),
},
};

Sent as output_config.effort. Effort controls how many tokens the model spends — thinking depth and answer length together — and it is the main cost lever on current models. The accepted values come from the Anthropic SDK’s own Effort enum, not from a list in Tracon; a model that does not support a level rejects the request with 400.

Thinking tokens count against ModelBinding.MaxOutputTokens. With high or above and no explicit limit, the request goes out with AnthropicProviderOptions.DefaultMaxOutputTokens (4096 by default), which a long answer can exceed. The agent validation report warns about this when the model catalog states a higher maximum.

The value does not reach ModelBinding.Fallbacks links: a fallback link gets no provider settings.

The setting key that selects where the prompt cache breakpoint goes: anthropic.promptCaching.placement (text: request or system).

public const string PromptCachingPlacementSetting = "anthropic.promptCaching.placement"

string

request (the default) sends a top-level cache_control: Anthropic places the breakpoint on the last cacheable block, so the whole request is cached. Requests that share a conversation reuse it.

system marks the end of the agent’s instructions instead and sends no top-level cache_control. Requests that carry a different document or question after the same instructions then share the cached instruction prefix; with request each of them would write a new entry that the next one cannot read. When a request carries no instructions, the top-level breakpoint is used.

Requires AnthropicProviderNames.PromptCachingSetting to be true.

The setting key that turns on prompt caching: anthropic.promptCaching (boolean).

public const string PromptCachingSetting = "anthropic.promptCaching"

string

Defaults to off. Turning it on lowers cost but changes behavior: cache_control is added to the request body, the fee for creating a cache entry is higher than the normal input fee for short prompts, and the model only caches prompts above a certain token threshold. It is opted in explicitly so there is no silent default.

Measured against claude-haiku-4-5-20251001: with it on, the response reported cache_creation_input_tokens=4209; with it off, this counter never appeared.

The setting key that sets how long a prompt cache entry lives: anthropic.promptCaching.ttl (text: 5m or 1h).

public const string PromptCachingTtlSetting = "anthropic.promptCaching.ttl"

string

Sent as cache_control.ttl. Requires AnthropicProviderNames.PromptCachingSetting to be true; on its own it is an error, not a silent no-op. When it is not set, Anthropic’s default (5 minutes) applies. A 1-hour entry costs more to write and pays off when the same prefix returns more than five minutes apart. The accepted values come from the Anthropic SDK’s own Ttl enum.

The prefix for provider-specific settings: anthropic.

public const string SettingsPrefix = "anthropic"

string

The setting key that provides the extended-thinking budget: anthropic.thinking.budgetTokens (integer).

public const string ThinkingBudgetTokensSetting = "anthropic.thinking.budgetTokens"

string

The value must be smaller than ModelBinding.MaxOutputTokens; otherwise Anthropic rejects the request.

While thinking is on, Anthropic allows ModelBinding.Temperature to be only 1. Any other temperature gets the request rejected with invalid_request_error — measured against the live API.

The setting key that selects how the model thinks: anthropic.thinking.mode (text: enabled or adaptive).

public const string ThinkingModeSetting = "anthropic.thinking.mode"

string

enabled sends thinking: {type: "enabled", budget_tokens} and requires AnthropicProviderNames.ThinkingBudgetTokensSetting. It is the mode older models use; current models reject budget_tokens with 400. When only AnthropicProviderNames.ThinkingBudgetTokensSetting is set, the mode is enabled, as before this key existed.

adaptive sends thinking: {type: "adaptive"}: the model decides when and how much to think, and AnthropicProviderNames.EffortSetting sets the depth. It takes no budget; setting AnthropicProviderNames.ThinkingBudgetTokensSetting with it is an error. Nothing is sent when neither key is set, so the model’s own default applies — no setting changes an existing agent’s behavior.

All setting keys this provider supports.

public static IReadOnlyList<string> SupportedSettings { get; }

IReadOnlyList<string>

A key absent from this list is not silently ignored; it fails compilation and the error message lists this list.