PLUGIN

Report

15 Downloads

OpenAI Compatible API Adapter for LM Studio

src / config.ts

import { createConfigSchematics } from "@lmstudio/sdk";

// This file contains the definition of configuration schematics for your plugin.

export const configSchematics = createConfigSchematics()
  .field(
    "modelv2",
    "string",
    {
      displayName: "Model Name",
      subtitle: "Enter the model name to use for generation.",
      placeholder: "claude-sonnet-4-20250514",
    },
    "claude-sonnet-4-20250514",
  )
  
  .field(
    "apiKeyv2",
    "string",
    {
      displayName: "API Key (Optional)",
      subtitle: "Your API key (not needed for local LM Studio server)",
      isProtected: true,
      placeholder: "Leave empty for local server, or enter sk-... / ant-...",
    },
    "",
  )
  .field(
    "overrideBaseUrlv2",
    "string",
    {
      displayName: "Base URL",
      subtitle: "Base URL for API calls",
      placeholder: "http://127.0.0.1:1234/v1",
    },
    "",
  )
  .field(
    "temperature",
    "numeric",
    {
      displayName: "Temperature",
      subtitle: "Values 0.0 - 2.0",
    },
    0.8,
  )
  .build();