AI provider setup (BYOK)
AI naming is opt-in and requires you to bring your own API key (BYOK). The default naming mode is fully deterministic and works offline with no key. Enable AI naming when you want richer, more context-aware label names.
When to use AI naming
Section titled “When to use AI naming”Default (deterministic) is the right choice for most cases:
- No API key, no cost, no network call
- Works in air-gapped environments
- Consistent — same string always produces the same name
- Validates instantly
AI naming adds value when:
- You have hundreds of labels in one batch and want nuanced names
- Your string values are ambiguous without surrounding context
- You’re using a free local model (Ollama, LM Studio) and want richer names at $0
In either mode, every name is editable before it applies. AI naming is a suggestion, not a requirement.
- Open the Command Palette (
Cmd+Shift+P) → Label Alchemy: Configure Settings - Enable AI-assisted naming
- Select your Provider
- Select or enter a Model
- Enter your API Key (skipped for Ollama, LM Studio, and unauthenticated custom endpoints)
- Label Alchemy runs a capability test (sends a single test prompt). If it passes, you’re ready. If it fails, an error message shows what’s wrong.
Your API key is stored in VS Code’s encrypted secret storage — never in settings.json, never
logged, never visible in plain text.
Naming scope & tuning
Section titled “Naming scope & tuning”AI naming has two scopes (labelAlchemy.aiNamingScope):
- Per-file (
chunk) — Free: each file is named from its own context. - Project-wide (
project) — requires a license: also reads your existingCustomLabels.labels-meta.xml, so an identical string reuses its existing label and new names follow your project’s convention. Without a license, AI naming falls back to per-file scope.
Additional settings shape the output (all only apply when AI naming is on):
| Setting | Effect |
|---|---|
aiNamingStyle | concise / descriptive / domainRich — how much component/domain context folds into a name |
labelNameCase | snake (default) or pascal for new names (existing/reused labels are never recased) |
aiNamingGuidance | Free-text instructions appended verbatim to the prompt (e.g. “prefix with the module name”) |
aiGenerateDescriptions | Also write a short Description for each label (uses extra output tokens) |
Whatever the model returns is always sanitized to a valid Salesforce name, and every name stays editable in the diff panel before you approve.
Supported providers
Section titled “Supported providers”Anthropic (Claude)
Section titled “Anthropic (Claude)”| Setting | Value |
|---|---|
| Provider | Anthropic |
| Recommended model | claude-sonnet-4-6 |
| Fast / cheap model | claude-haiku-4-5 |
| API key required | Yes |
| Key source | console.anthropic.com |
Claude Haiku is the best price/quality tradeoff for label naming — fast, cheap, and produces clean Salesforce-style names. Sonnet if you want the best quality. Do not use Claude Opus for this task — it’s slower and more expensive with no practical naming advantage.
OpenAI
Section titled “OpenAI”| Setting | Value |
|---|---|
| Provider | OpenAI |
| Recommended model | gpt-4o-mini |
| Higher quality | gpt-4o, gpt-4.1 |
| API key required | Yes |
| Key source | platform.openai.com |
gpt-4o-mini is the best value for naming. gpt-4o / gpt-4.1 for more careful names on
complex string sets.
Google Gemini
Section titled “Google Gemini”| Setting | Value |
|---|---|
| Provider | Gemini |
| Recommended model | gemini-2.0-flash |
| API key required | Yes |
| Key source | aistudio.google.com |
Gemini 2.0 Flash is fast and has a generous free tier. Good option if you already have a Google AI Studio key.
DeepSeek
Section titled “DeepSeek”| Setting | Value |
|---|---|
| Provider | DeepSeek |
| Recommended model | deepseek-chat |
| API key required | Yes |
| Key source | platform.deepseek.com |
Very cost-effective. deepseek-chat (V3) produces solid naming results.
OpenRouter
Section titled “OpenRouter”| Setting | Value |
|---|---|
| Provider | OpenRouter |
| Model format | <provider>/<model> — e.g. meta-llama/llama-3.3-70b-instruct |
| API key required | Yes |
| Key source | openrouter.ai |
OpenRouter gives you access to 100+ models from a single API key. Useful if you want to experiment or you already have OpenRouter credits. Any model that supports the OpenAI Chat Completions format works.
Ollama (local, free)
Section titled “Ollama (local, free)”| Setting | Value |
|---|---|
| Provider | Ollama |
| API key required | No |
| Default base URL | http://localhost:11434 |
| Recommended models | llama3.3, qwen2.5:14b, deepseek-r1:14b |
| Prerequisites | ollama.ai installed and running |
Nothing leaves your machine. Ollama runs the model locally. Free and private. Best choice for air-gapped setups or when privacy is a hard requirement.
Setup:
# Install Ollama, then pull a modelollama pull llama3.3# Ollama runs on port 11434 by default — no additional config neededLabel Alchemy connects to http://localhost:11434 automatically. Override in settings if
your Ollama runs on a different port.
LM Studio (local, free)
Section titled “LM Studio (local, free)”| Setting | Value |
|---|---|
| Provider | LM Studio |
| API key required | No |
| Default base URL | http://localhost:1234 |
| Prerequisites | lmstudio.ai installed, server started |
Nothing leaves your machine. LM Studio hosts any GGUF model as a local OpenAI-compatible server. Same privacy guarantees as Ollama.
Setup:
- Download and install LM Studio
- Download a model (Models tab)
- Go to Local Server → Start Server (default port 1234)
- Set Provider to
LM Studioin Label Alchemy settings
Custom OpenAI-compatible endpoint
Section titled “Custom OpenAI-compatible endpoint”| Setting | Value |
|---|---|
| Provider | Custom |
| Base URL | Your endpoint URL |
| API key | Optional (depends on your endpoint) |
| Model | Whatever your endpoint accepts |
Use this for:
- A self-hosted vLLM or LiteLLM proxy
- A corporate proxy in front of a supported model
- Any other service that speaks the OpenAI Chat Completions API
Model requirements
Section titled “Model requirements”Label Alchemy sends a single chat message to the model and parses the response as a raw string (not JSON). Any model that can follow instructions well enough to return a short underscore-separated name is compatible.
Minimum viable models: ~7B parameters or equivalent quality. Models below 7B tend to produce inconsistent or non-compliant names.
Capability test
Section titled “Capability test”When you configure a provider, Label Alchemy runs a quick test: it sends the message
Return only this text: Hello and checks whether the response contains Hello. If the test
fails:
- Wrong base URL — check that the URL matches your provider’s endpoint exactly
- Invalid API key — the key may have been copied with whitespace or is expired
- Model not available — the model name may be wrong or not loaded (Ollama/LM Studio)
- Server not running — start Ollama or LM Studio server first
See Troubleshooting for more on capability-test failures.
Privacy
Section titled “Privacy”When you use an API-based provider (Anthropic, OpenAI, etc.), the string values from your source files are sent to that provider’s API. This is necessary for the model to suggest names.
If your Salesforce code contains confidential business strings, use Ollama or LM Studio — both run locally and nothing leaves your machine.
Keys are stored in VS Code’s encrypted secret storage (vscode.SecretStorage). They are never
written to disk in plain text and are not accessible to other extensions.
See the full privacy policy for details on what is and isn’t sent.