Skip to content

Models and providers ​

Model providers, per-provider model preferences, reasoning and prompt caching, and the model capability catalog.

Providers and model selection ​

FieldDescriptionDefault
ProvidersPersonal model provider dictionary, usually stored in ~/.craft/config.jsonEmpty
ProviderIdCurrent personal provider id. Empty means no provider is selectedEmpty
ProviderPreferencesComplete MainAgent preferences keyed by provider id. The selected provider must have an effective entry{}
NetworkTimeoutSecondsGlobal model request timeout in seconds; providers can override it600

Personal provider example:

json
{
  "Providers": {
    "anthropic": {
      "DisplayName": "Anthropic",
      "Protocol": "anthropic",
      "ApiKey": "${ANTHROPIC_API_KEY}"
    },
    "openrouter": {
      "DisplayName": "OpenRouter",
      "Protocol": "openai-chat-completions",
      "ApiKey": "${OPENROUTER_API_KEY}",
      "EndPoint": "https://openrouter.ai/api/v1"
    }
  }
}

Workspace model selection example:

json
{
  "ProviderId": "anthropic",
  "ProviderPreferences": {
    "anthropic": {
      "Model": "claude-sonnet-4-5",
      "Reasoning": {
        "Enabled": true,
        "Effort": "High",
        "Output": "Full"
      },
      "Speed": "Fast"
    }
  }
}

ProviderPreferences merges per provider id, never field by field. When global and workspace config both define the same provider id, the workspace record replaces the global one in full.

Preference fieldValuesDescription
ModelNon-empty model idModel used for new MainAgent threads
Reasoning.Enabledtrue, falseEnables reasoning when the model supports the choice
Reasoning.EffortLow, Medium, High, ExtraHigh, Max, UltraRequested reasoning effort
Reasoning.OutputNone, Summary, FullRequested reasoning output
SpeedStandard, FastRequested inference speed; unsupported Fast runs as Standard

Max requests native maximum reasoning effort. Ultra uses the same Max effort and adds proactive Dynamic Workflow orchestration.

Provider object fields:

FieldDescriptionDefault
DisplayNameUser-facing provider name; falls back to the provider id when emptyEmpty
ProtocolProvider protocol: anthropic, openai-chat-completions, or openai-responses. Empty values default to openai-chat-completions.openai-chat-completions
ApiKeyProvider API key; prefer ${ENV_NAME} environment variable referencesEmpty
AuthMethodAuthentication method: apiKey uses the static ApiKey; chatgptOAuth authenticates with a ChatGPT subscription account (OpenAI protocols only, see below). Unrecognized values fall back to apiKeyapiKey
ChatGptAccountIdChatGPT account id written by the Sign in with ChatGPT flow; do not edit manuallyEmpty
ChatGptPlanTypeChatGPT plan tier written by the Sign in with ChatGPT flow (free, plus, pro, business, enterprise, edu); do not edit manuallyEmpty
EndPointProvider base URL; empty values use the protocol default endpointOpenAI protocols: https://api.openai.com/v1; anthropic: https://api.anthropic.com
NetworkTimeoutSecondsPer-provider request timeout, overriding the global NetworkTimeoutSecondsEmpty
MaxOutputTokensPer-provider default maximum output tokens, applied when a request does not set its ownEmpty
StreamMaxRetriesPer-provider streaming reconnection attempts for dropped or idle provider streams; 0 disables stream retry5
StreamIdleTimeoutMsPer-provider idle timeout for streaming responses, in milliseconds300000
SupportsImageGenerationWhether this provider serves the OpenAI Images API. When omitted, ChatGPT OAuth and API-key providers on the official OpenAI endpoint default to true; other endpoints default to false.Provider default
SupportsFreeformToolsWhether this provider accepts grammar-constrained (custom) tools on the Responses protocol. When false, tools such as code mode's CodeMode are sent as ordinary function tools. When omitted, chatgptOAuth providers and API-key providers on the official OpenAI endpoint default to true; other endpoints default to false.Provider default

Sign in with ChatGPT ​

json
{
  "Providers": {
    "openai": {
      "DisplayName": "OpenAI (ChatGPT)",
      "Protocol": "openai-responses",
      "AuthMethod": "chatgptOAuth"
    }
  }
}

A chatgptOAuth provider authenticates with a ChatGPT subscription instead of an API key. Run dotcraft auth openai login to sign in — it stores the OAuth token bundle as auth.json in the user data directory, writes the provider entry above into the global configuration, makes it the default provider when none is selected, and seeds a default model preference when the provider has none. In this mode ApiKey and EndPoint are ignored and the effective protocol is always openai-responses; the resolution rules live in Configure model providers. dotcraft auth openai logout deletes the tokens and reverts the provider to apiKey.

Reasoning and prompt caching ​

FieldDescriptionDefault
Reasoning.EnabledRequests provider reasoning supportfalse
Reasoning.EffortReasoning depth: None / Low / Medium / High / ExtraHigh / Max / UltraMedium
Reasoning.OutputReasoning visibility: None / Summary / FullFull
PromptCaching.EnabledInject prompt cache markers for matching modelstrue
PromptCaching.ModelPatternsCase-insensitive model name fragments. Empty matches no models["claude"]
PromptCaching.PlacementMarker placement strategy. Currently only ConversationTail is supportedConversationTail
PromptCaching.TtlAnthropic cache TTL. Empty uses the default 5 minutes; 1h requests the long cacheEmpty
PromptCaching.WarmingRefresh the Anthropic prompt cache while a turn waits on long tool runs or approvals, so the next request reuses the cache instead of writing it againtrue

Deep-thinking adapter catalog files:

  • Global: ~/.craft/model-thinking-adapters.json
  • Workspace: .craft/model-thinking-adapters.json

The built-in catalog exposes full reasoning choices for unlisted Anthropic-protocol models, but does not assume they support Anthropic adaptive request shaping. Add anthropicThinking entries for models or endpoints that explicitly support that shape.

For Anthropic-compatible providers, anthropicMessageContent can declare how DotCraft reasoning history should be represented. The built-in DeepSeek Anthropic adapter maps historical TextReasoningContent to Anthropic-compatible thinking blocks before sending history; it is not a generic unsupported-block filter.

json
{
  "deepThinking": {
    "models": ["deepseek", "mimo", "my-thinking-model-"],
    "endpoints": ["deepseek", "my-thinking-gateway"]
  },
  "anthropicThinking": {
    "adapters": [
      {
        "models": ["my-adaptive-anthropic-model-"],
        "thinking": { "type": "adaptive", "display": "fromReasoningOutput" },
        "outputConfig": { "effort": "fromReasoningEffort" }
      }
    ]
  },
  "anthropicMessageContent": {
    "adapters": [
      {
        "models": ["deepseek"],
        "endpoints": ["deepseek"],
        "reasoningHistory": { "blockType": "thinking" }
      }
    ]
  }
}

Model capability catalog ​

DotCraft ships a built-in catalog for model context windows and Fast Mode support. Extend or override it with:

  • Global: ~/.craft/models.json
  • Workspace: .craft/models.json
json
{
  "defaultContextWindow": 256000,
  "models": {
    "my-256k-model": {
      "contextWindow": 256000
    },
    "custom-fast-model": {
      "contextWindow": 1048576,
      "fast": {
        "protocols": ["openai-responses"]
      }
    },
    "custom-anthropic-model": {
      "fast": {
        "protocols": ["anthropic"]
      }
    }
  }
}

Workspace entries override global entries, which override the built-in catalog. Fields merge independently for each model pattern. Set fast to null to disable an inherited Fast capability. Model patterns use case-insensitive longest-prefix matching and also match namespaced suffixes such as provider/custom-fast-model.

Built-in context-window values are synchronized from the provider-agnostic models.dev catalog for models that support tool calls, include text output, and declare a context window of at least 1,000 tokens. The final segment of the canonical model id is used as its lowercase key. If a provider serves a different limit, set an override in the global or workspace catalog. More-specific keys win over family prefixes, so a concrete model can safely carry a different window from its family.

Model context capacity comes directly from the merged catalog. Unknown models use defaultContextWindow, falling back to 256,000 tokens. Summary reserves and safety buffers are applied by compaction after the optional client budget.