# Anthropic Claude

This document explains how to configure Anthropic Claude as the LLM provider for yCrash AI chat.

Note

After you create ycbuddy-config.json, place it in the upload directory and restart yCrash as described in the Introduction.

Use this provider if your organization standardizes on Anthropic Claude. llmProvider may be either "claude" or "anthropic".


# Step 1: Get Your Anthropic API Key

  1. In a web browser, go to Anthropic Console (opens new window)
  2. Sign in with your Anthropic account
  3. Open API keys
  4. Create a new key and copy it when it is displayed

Anthropic keys typically start with sk-ant-. Store the key in a secrets manager or restricted server directory. Treat it like a password - do not email it, commit it to Git, or share it in tickets.


# Step 2: Add the Claude Settings

Paste the following JSON into ycbuddy-config.json and replace your-anthropic-api-key with the key you copied from Anthropic:

{
  "llmProvider": "claude",
  "llmApiKey": "your-anthropic-api-key",
  "llmModelName": "claude-sonnet-4-6",
  "llmEmbeddingModelName": "local-all-minilm-l6-v2-q",
  "llmMaxOutputTokens": 4096,
  "llmReasoningEffort": "low"
}
1
2
3
4
5
6
7
8

# What each field means

Field Required Notes
llmProvider Yes "claude" or "anthropic"
llmApiKey Yes Anthropic API key (sk-ant-...). You can also set LLM_API_KEY.
llmModelName Yes Chat model id (e.g. claude-sonnet-4-6). If omitted, the client falls back to claude-3-5-sonnet-20241022.
llmEmbeddingModelName Yes Prefer local-all-minilm-l6-v2-q so RAG does not need a separate Gemini/OpenAI embedding key.
llmMaxOutputTokens No Soft cap on Claude max_tokens (default 4096). Prefer this over the model's full max output (e.g. 128k) so chat stays bounded. Hard ceiling: 128000.
llmReasoningEffort No Mapped to Claude output_config.effort for Sonnet 4.6+. Default "none" is sent as "low" for chat latency.

# Supported Claude Chat Models

yCrash recognizes these Anthropic model IDs (use the exact string in llmModelName). Unknown IDs still work against the API but use conservative token limits.

Model ID Context Best for
claude-sonnet-4-6 1M Recommended - strong default for production RCA chat
claude-opus-4-6 / claude-opus-4-7 / claude-opus-4-8 1M Highest capability Claude 4.6+ family
claude-sonnet-5 / claude-opus-5 1M Claude 5.x family
claude-haiku-4-5 200K Faster / cheaper responses
claude-sonnet-4-5 / claude-opus-4-5 200K Prior Claude 4.5 family
claude-3-5-sonnet-20241022 200K Fallback default if llmModelName is omitted

Dated aliases such as claude-sonnet-4-5-20250929 and claude-haiku-4-5-20251001 are also recognized.


# Optional Claude Tuning

Field Default Notes
llmMaxOutputTokens 4096 Caps Claude max_tokens. Raise (e.g. 8192) for longer RCAs.
llmReasoningEffort "none" Values: none, minimal, low, medium, high, xhigh, max. For Claude, none/minimal are mapped to low (latency-sensitive chat). Use medium/high when analysis depth matters more.

# Step 3: Place the File and Restart

Place ycbuddy-config.json in the yCrash upload directory and restart the server. See the Introduction for file location, restart, and verification steps.

# What success looks like in logs

Look for a message similar to:

  • StreamingClaudeLLMClient initialized: model=claude-sonnet-4-6, ...

# Troubleshooting

Symptom Likely cause
Log: Unsupported LLM provider Typo in llmProvider (must be claude or anthropic)
Log: Anthropic API key not provided / Claude client not initialized Missing llmApiKey and no LLM_API_KEY env var
Chat opens but returns auth / 401 errors Invalid, expired, or revoked Anthropic API key
Slow first chat Cold TLS handshake to api.anthropic.com; later requests should be faster

Also confirm:

  • llmProvideris"claude"or"anthropic"` (lowercase)
  • API key starts with sk-ant- and has Messages API access
  • Outbound HTTPS from the yCrash server to Anthropic is allowed (api.anthropic.com)

For shared file-placement and restart checks, see the Introduction troubleshooting checklist.