Use Buffaly with Anthropic
Connect an Anthropic API key or a supported Claude account runtime. Both use provider anthropic; Anthropic Feature.DefaultTransport chooses which route is available.
Install the matching Anthropic module
Include Buffaly.Provider.Anthropic through the target release's package/provisioning workflow. Its enabled manifest entry must load AnthropicProviderCatalogSource and AnthropicCompletionExecutor in the consuming host/worker processes. Use the common installation and activation procedure before changing credentials. A package in the release profile is not proof it is loaded locally.
Load the complete database-backed Anthropic Feature settings through provider administration. Preserve the existing document, API settings and nested account settings when saving changes. This module declares chat completion, not an embedding or speech component.
Configure the API-key route
- Obtain an Anthropic API key for the intended account and save it with the supported credential control as
Anthropic Feature.ApiKey. A Claude subscription login does not populate this key. - Set
DefaultTransporttoprovider_native. KeepBaseUrl=https://api.anthropic.comandVersion=2023-06-01unless your supported endpoint requires another value.MaxTokensmust be positive; the current default is 32768. - Use a nonempty
Modelsdictionary and setDefaultModelNameto one of its exact API model IDs. Each entry ownsSupportedReasoningLevels,DefaultReasoningLevelandThinkingMode.
This non-secret settings fragment shows a model without reasoning controls. Replace the placeholder with the exact supported API ID and merge it into the existing settings; save the key separately.
{
"DefaultTransport": "provider_native",
"BaseUrl": "https://api.anthropic.com",
"Version": "2023-06-01",
"MaxTokens": 32768,
"DefaultModelName": "<exact-api-model-id>",
"Models": {
"<exact-api-model-id>": {
"SupportedReasoningLevels": [],
"DefaultReasoningLevel": "",
"ThinkingMode": "none"
}
}
}For reasoning-capable API models, the supported effort vocabulary is low, medium and high. Configure only the levels the model supports, with a default in that list. ThinkingMode accepts none, budget_tokens (also accepted as enabled) or adaptive. Match the mode to that model; native account effort options are not an API capability list.
Configure the Claude account transport
- Provision the supported Claude native executable using the vendor's instructions for the target platform. Complete its supported account login under the actual Buffaly execution identity. A desktop administrator's login is not automatically available to a service or separate worker.
- In the existing
Anthropic Feature, configureClaudeCode.Enabled=true,ClaudeCode.ExecutablePathas an existing absolute executable file andClaudeCode.ConfigurationDirectoryas an existing absolute native configuration directory. - Populate
ClaudeCode.Modelswith exact native model keys and their model-specific reasoning/thinking settings. SetClaudeCode.DefaultModelNameto a key in that dictionary. Native models can advertisexhighormaxas well as the API effort levels; select only advertised values. - Set
DefaultTransport=claude_code. Use provider administration's explicit Claude native refresh when you intend to contact the native control protocol. It updates the last-known-good account, model and limit snapshot; it is different from reading the catalog. - Read back
ClaudeVersion,SubscriptionType,LastRefreshUtcandRefreshError. Use the nativeModelNamekey for selection, not optionalResolvedModelmetadata.
ClaudeCode.TimeoutSeconds is a positive account-probe budget (default 300), not a completion deadline. DiagnosticDirectory is optional task-data capture and must name an existing absolute directory when intentionally enabled. Keep account credentials in the native login owner, not in settings examples, prompts or logs.
Only the selected transport is enabled. A claude_code failure does not fall back to the API key. This account route is independent of OpenAI's codex_backend authentication and does not restore the retired Codex editing workflow.
Select the route's exact model
After saving and reloading settings, open the complete provider catalog. Find anthropic, its enabled provider_native or claude_code transport and that transport's model rows. Select a model and one of its reasoning values in the session selector; use empty reasoning for a row without controls. Read back the selection. The model-management guide shows the authenticated external selection request.
Verify setup without inference first
- Inspect component-load diagnostics, saved non-secret settings and the catalog's
ProvidersandError. Confirm the intended transport, exact default and efforts. - Check masked key status for API access, or the existing native account/refresh status for account access. Reading a saved snapshot does not launch a native refresh.
- Inspect the current session selection without changing it. These checks establish configuration; vendor acceptance requires an intended execution test.
- When you choose to test execution, select the model in a test session and send
Reply exactly: ANTHROPIC_PROVIDER_OK. Confirm normal assistant text and the intended provider/transport/model. This request uses API billing or account quota.
Common failures
- Provider absent: check the module's enabled entry, contract/DLL validation and feature/catalog errors.
- API authentication fails: check the intended feature key and API account access, not the native subscription login.
- Account route rejected: check executable/configuration paths on every consuming machine and the actual execution identity's native login.
- Model or effort rejected: compare with the selected transport's catalog; API and native keys/efforts can differ.
- Refresh fails: read
RefreshErrorand native version/account status. Correct the failing native prerequisite rather than switching transports to hide it.