GoodMemGoodMem
ReferenceCLILLM

LLM Create

LLM Create CLI command reference

goodmem llm create

Create a new LLM

Synopsis

Create a new LLM in the GoodMem service with the specified configuration.

goodmem llm create [flags]

Examples

  # Create an OpenAI GPT-4 LLM with a client-provided ID
  goodmem llm create \
    --id "123e4567-e89b-12d3-a456-426614174000" \
    --display-name "My GPT-4" \
    --provider-type OPENAI \
    --endpoint-url "https://api.openai.com/v1" \
    --model-identifier "gpt-4o" \
    --cred-api-key "sk-..." \
    --supports-chat

  # Create an OpenAI GPT-4 LLM (server-generated ID)
  goodmem llm create \
    --display-name "My GPT-4" \
    --provider-type OPENAI \
    --endpoint-url "https://api.openai.com/v1" \
    --model-identifier "gpt-4o" \
    --cred-api-key "sk-..." \
    --supports-chat \
    --supports-streaming \
    --supports-function-calling \
    --sampling-max-tokens 4096 \
    --sampling-temperature 0.7

  # Create a LiteLLM proxy LLM using a bearer token
  goodmem llm create \
    --display-name "LiteLLM Claude" \
    --provider-type LITELLM_PROXY \
    --endpoint-url "https://llm-proxy.internal/v1" \
    --model-identifier "anthropic/claude-3-opus" \
    --cred-api-key "litellm-token" \
    --supports-chat \
    --supports-system-messages \
    --sampling-max-tokens 2048

  # Create a Vertex AI (OpenAI-compatible) LLM using Google ADC credentials
  # Note: Vertex must be configured via its OpenAI compatibility endpoint (exact URL varies by project/region).
  goodmem llm create \
    --display-name "Vertex (OpenAI-compatible, ADC)" \
    --provider-type CUSTOM_OPENAI_COMPATIBLE \
    --endpoint-url "https://vertex-openai-compat.example.com/v1" \
    --model-identifier "gpt-4o-mini" \
    --cred-gcp \
    --cred-gcp-scope https://www.googleapis.com/auth/cloud-platform \
    --cred-gcp-quota my-billing-project \
    --supports-chat

  # Create a DashScope chat LLM on the US (Virginia) access domain using the OpenAI-compatible API
  goodmem llm create \
    --display-name "DashScope qwen3.7-flash" \
    --provider-type DASHSCOPE \
    --endpoint-url "https://dashscope-us.aliyuncs.com" \
    --model-identifier "qwen3.7-flash" \
    --modalities TEXT \
    --dashscope-api-dialect OPENAI_COMPATIBLE \
    --cred-api-key-prompt \
    --supports-chat

  # Verify a DashScope endpoint and dialect before creating the LLM
  goodmem doctor llm "https://dashscope-us.aliyuncs.com" \
    --model "qwen3.7-flash" \
    --probe-dialect \
    --cred-api-key-prompt

  # Create a local VLLM LLM
  goodmem llm create \
    --display-name "Local Llama" \
    --provider-type VLLM \
    --endpoint-url "http://localhost:8000/v1" \
    --model-identifier "llama3-70b" \
    --supports-chat \
    --supports-completion

Options

      --api-path string                                Optional API operation path; omitted values use a provider- and dialect-specific default
      --client-config string                           Provider-specific client configuration as JSON string
      --cred-api-key string                            API key for provider endpoint (use "-" to read from piped stdin)
      --cred-api-key-file string                       Read API key from file (file should be mode 0600)
      --cred-api-key-prompt[=true|false]               Prompt for API key interactively (requires TTY, input hidden)
      --cred-gcp[=true|false]                          Use Google Application Default Credentials
      --cred-gcp-quota string                          Quota project for Google ADC requests
      --cred-gcp-scope strings                         Additional Google ADC OAuth scope (can be specified multiple times)
      --dashscope-api-dialect string                   DashScope API dialect for DashScope resources only (LLM_NATIVE_TEXT, LLM_NATIVE_MULTIMODAL, or OPENAI_COMPATIBLE)
      --description string                             Description of the LLM
      --display-name string                            Display name for the LLM (required)
      --endpoint-url string                            Provider endpoint base URL without the operation path (required)
  -h, --help[=true|false]                              help for create
      --id string                                      Optional: Client-provided UUID for the LLM (16 bytes). Server generates if omitted.
  -l, --label strings                                  Labels in key=value format (can be specified multiple times)
      --max-context-length int32                       Maximum context length in tokens
      --modalities strings                             Supported modalities (TEXT, IMAGE, AUDIO, VIDEO) (default [TEXT])
      --model-identifier string                        Model identifier (required)
      --monitoring-endpoint string                     Monitoring endpoint URL
      --no-supports-chat[=true|false]                  LLM does not support chat/conversation mode
      --no-supports-completion[=true|false]            LLM does not support text completion mode
      --no-supports-function-calling[=true|false]      LLM does not support function calling
      --no-supports-sampling-parameters[=true|false]   LLM does not support sampling parameters
      --no-supports-streaming[=true|false]             LLM does not support streaming responses
      --no-supports-system-messages[=true|false]       LLM does not support system messages
      --owner string                                   Owner ID for the LLM (requires admin permissions)
      --provider-type string                           Provider type (OPENAI, LITELLM_PROXY, OPEN_ROUTER, DASHSCOPE, VLLM, OLLAMA, LLAMA_CPP, CUSTOM_OPENAI_COMPATIBLE) (required)
      --sampling-frequency-penalty float32             Frequency penalty (provider-specific)
      --sampling-max-tokens int32                      Maximum number of tokens to generate
      --sampling-presence-penalty float32              Presence penalty (provider-specific)
      --sampling-stop-sequences strings                Stop sequences (can be specified multiple times)
      --sampling-temperature float32                   Sampling temperature (provider-specific; zero is allowed)
      --sampling-top-k int32                           Top-k sampling parameter
      --sampling-top-p float32                         Top-p sampling parameter (0.0-1.0)
      --supports-chat[=true|false]                     LLM supports chat/conversation mode
      --supports-completion[=true|false]               LLM supports text completion mode
      --supports-function-calling[=true|false]         LLM supports function calling
      --supports-sampling-parameters[=true|false]      LLM supports sampling parameters (temperature, top_p, etc.)
      --supports-streaming[=true|false]                LLM supports streaming responses
      --supports-system-messages[=true|false]          LLM supports system messages
      --version string                                 Version of the LLM

Options inherited from parent commands

      --api-key string   API key for authentication (can also be set via GOODMEM_API_KEY environment variable)
      --server string    GoodMem server URL (gRPC API; default ports: https=443, http=80)

SEE ALSO

On this page