Give a loaded LM Studio instance an explicit identifier with the CLI’s identifier option when an application needs a predictable model value. Check that the identifier appears in the live API response, then send a request using that exact string. When you later load another artifact under the same name, record that change and repeat the small check. The identifier tells clients how to address an instance. The model artifact tells you what is running behind it.

This example uses a single Mac with a working LM Studio CLI and a downloaded text chat model. The local HTTP server stays on loopback. The test prompt names a collection point for a fictional library delivery. It offers a recognizable answer without involving your files or a real request. This walkthrough deliberately uses a new name so that no existing client’s identifier is taken over during the exercise.

Record the artifact and active instance separately

List the downloaded artifacts and loaded instances. A downloaded artifact includes the weights needed for inference. The loaded instance represents the model managed by the current runtime, and it can have its own identifier. Keep those strings together in your run notes with separate labels. If you use several quantizations, record the complete artifact name or file path before choosing a short name for the clients.

lms ls
lms ps
lms server status

Find a text chat model you can recognize in the downloaded list. Type it in full when a short search would match several artifacts. If the loaded listing already contains an instance with the identifier you planned, choose a fresh identifier for this exercise. A second active instance also uses memory. On a Mac with limited free memory, schedule the test for a period when you can unload an unused instance safely, or use a separate session that begins with one intended model.

LM Studio documents options for the name of the loaded instance in its load command. The identifier argument concerns requests to the running service. It leaves the original downloaded artifact identifiable by its own name. The alias is worth applying explicitly each time you load an instance through a run script because clients can reconnect after the runtime was closed or restarted. LM Studio model load CLI.

Load a new identifier and confirm it exists

Use a short, descriptive name for the fictional test. The example chooses library-dispatch. Before adopting it, check the active instance list from the previous step. Choose another if a real project already uses that label. For an application that runs on more than one Mac, reserve the same name intentionally on each host and decide whether all hosts should serve the same artifact and settings.

lms load 'REPLACE_WITH_DOWNLOADED_MODEL' --identifier library-dispatch
lms ps

Confirm that the loaded instance line shows the identifier you requested and corresponds to the artifact you selected. A successful inference will be easier to interpret if this is the only new instance, particularly on a Mac where another user or app accesses the service. If the load fails, resolve the resource or artifact problem first. Changing a client setting cannot make the expected instance appear.

Use the running server’s known loopback port or start the test listener locally if no server is running. Then request the model listing. For an authenticated server, supply its local bearer token from your environment or another method already used with your local service. The example assumes the listener accepts this request with no token.

lms server start --bind 127.0.0.1 --port 1234
curl -sS --connect-timeout 2 http://127.0.0.1:1234/v1/models

Look for the exact new identifier under an ID in the returned data. The API reports the models it exposes to a caller under its current settings, so the runtime listing from the prior step is also useful evidence. If a name appears under a label in the app but never appears as the exact API ID, take another look at the loaded instance name. Preserve capitalization and punctuation in clients. LM Studio list models endpoint.

Send a predictable request through the identifier

Copy the value from the API response. If you chose a different identifier, update the body before sending it. The response includes the first choice’s text and a finish reason. The exercise’s expected visible content is North Door. An ordinary text model can usually return the two words within the small response budget. A reasoning-oriented model may need more room for this prompt, which you can adjust without changing the alias.

curl -sS -w '\nHTTP %{http_code}\n' \
  http://127.0.0.1:1234/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model":"library-dispatch",
    "messages":[{"role":"user","content":"Shipment note. The library returns box goes to North Door. The poster tube goes to Side Desk. Reply only with the returns box destination."}],
    "max_tokens":48,
    "stream":false
  }'

Successful lookup of the identifier and fidelity to the test note are separate observations. A status indicating an unknown model fails lookup even if the basic route exists. A normal response that says Side Desk confirms lookup while failing the content check. A response with the expected two words confirms the intended path for this sample. Record which happened before deciding whether the app needs an address fix or the model needs another content check.

Test a second successful input under the same identifier. Change the returns box destination to Courtyard Desk and leave the poster tube unchanged. Check that the answer changes to Courtyard Desk. The result provides evidence that the client is sending the new request rather than showing a previous conversation. It also demonstrates why the stable identifier can be treated separately from the application prompt and its expected values.

Compare the verified name with a stale name

For a configuration change, first save the previous working identifier somewhere you can restore it. Change the identifier in a temporary copy of your client configuration or in the command body. Use a throwaway, unique name like library-dispatch-unused and verify that it is absent from the listing first. Capture how this build responds to the unknown name. A rejected request confirms that the deployment detects a stale identifier at its API boundary. If the server still responds with a model, review the runtime’s routing behavior before treating names as an enforced boundary.

Restore the verified identifier and send the short changed input again. If you configure a GUI client, look for updated settings after opening a fresh conversation. Some applications cache a list or remember a provider and model inside each chat. A fresh thread with the expected provider selected is an independent check that the new default was applied. Refresh the displayed model list where the client offers that action, and copy the exact ID rather than choosing a similar display string.

When two model IDs are near-identical, write them into the run note in full and record the client with each. Suppose one temporary test uses library-dispatch-candidate and another points to library-dispatch. Saving the entire string improves the chance that a second person can reproduce the test. It also lets a script distinguish the temporary test profile from the active application configuration without parsing a descriptive model name.

Change the artifact behind the identifier carefully

When the goal is to try another checkpoint, run it first under a separate candidate name if memory and the current service allow that. Send the synthetic prompt to the candidate, collect the response, and include a task representative of your real application when you are ready to compare quality. Choose the settings for the candidate explicitly. The same checkpoint at a different context length can have different behavior when a client sends a long history. The alias does not capture that choice.

If you decide to reuse the application identifier for a replacement, wait for affected calls to finish. Review which instance has the old name and unload only that instance through the UI or the documented CLI. Then load the chosen candidate artifact with the production identifier, check the active and advertised listings, and repeat both synthetic inputs. Keep the prior artifact and settings available until you have finished verification, so reloading the older instance remains a clear rollback action. LM Studio active models CLI.

A workable handoff names the local address, API identifier, actual artifact, relevant load settings, and test response. For example, the client may still send library-dispatch while the recorded artifact changes on a planned date. Anyone diagnosing the service then has a stable client value to read back and a concrete history of what that value represented. If an answer changes after the switch, the run note gives you a starting point for comparing the underlying model or settings before editing unrelated clients.

Record the alias in the consumer’s configuration

In a script, put the model ID next to the API base address, wherever the script already reads its application settings. A reviewer should be able to find both without inspecting the prompt construction. In a desktop app, the equivalent record is the selected provider and exact model field. A development and production client can use the same alias on separate Mac hosts if you make that policy explicit. The address and startup record still determine which model actually receives a request.

Treat an alias copied into an environment variable as a configuration value. After changing it, launch a fresh client process or reload the application settings using its normal procedure. An already running process may have captured the previous value at startup. Use the changed location prompt before copying this particular profile into any shared settings. If the client’s log allows it, record the submitted model name for this synthetic request. Compare it with the live model listing. A mismatch at this point shows a stale client value even if another profile is working against the same host.

A stable name also makes a clean retirement possible. List the callers that still use it, identify the replacement name, and test one client before removing an instance that may serve others. A brief run note can give the date of the change and each verified client. When revisiting the setup months later, those details make it clear whether to look for a changed host, an old alias, or a different artifact behind an established name.