Skip to content

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io

355 B
Raw Blame
/**
 * Provider keys are persisted as config object keys, so they are restricted to
 * a lowercase slug charset. Shared by the OpenCode / OpenClaw / Hermes editors
 * in ProviderForm, the Pi / Oh My Pi editor and the Kimi editor.
 */
export function normalizeProviderKey(value: string): string {
  return value.toLowerCase().replace(/[^a-z0-9-]/g, "");
}