How to Connect a Custom LLM to a Desktop AI Assistant
A practical guide to adding a custom large language model to a desktop AI assistant: what to prepare, how to create the configuration, how to confirm the model is actually in use, and how to troubleshoot common setup and authentication issues.
Connecting a custom large language model to a desktop AI assistant looks like filling in a few fields. In practice, it involves the model endpoint, the interface protocol, authentication, the model identifier, and the scope in which a conversation actually takes effect. First-time setup often fails in predictable ways: the add-model entry cannot be found, the provider type is unclear, or the model is saved but chat still uses the previous one.
This guide does not target a specific application or a particular model. It uses a generic desktop AI assistant to show how to connect a custom model that supports a standard chat interface. Menu names and page layouts may differ by version, but the overall approach is the same.
1. Information to prepare before setup
Confirm the following before you start.
Service endpoint
This is the address the model service uses to accept requests. The provider usually supplies it. It may be a full request URL or only the service root. Fill it in according to the client page.
If the page already has a separate field for the interface path or API path, do not append that path again. If there is only one service-address field, enter the complete address provided by the service. One extra or missing path segment can make the request return a not-found or unreachable result.
Access key
Most online model services require a key to verify that the caller is allowed to use the service. The key is usually a long random string. Copy it in full, and avoid leading or trailing spaces, line breaks, or invisible characters.
For security, do not put the key in public code, screenshots, or shared documents. If the software can store it with local encryption, enable that option. If it supports environment variables, you can also manage the key that way.
Model identifier
The model name is not necessarily the display name shown in the interface. At request time, the server usually routes by an exact model identifier. Use the identifier supplied by the provider, not a guessed name.
Interface protocol
Confirm that the server supports the general chat protocol the client understands, such as a message list, role fields, a temperature parameter, and a maximum output length. If the client and server protocols do not match, correct addresses and keys may still fail to return results.
Model capabilities
Some models support text chat only. Others support images, tool calling, structured output, or long context. Capability switches in the client should match what the server actually supports. Do not enable options only to make the form look complete.
2. Open the custom model configuration page
After installing and starting the desktop assistant, look for the configuration entry in this order:
- Open Settings, Preferences, or the model management page.
- Look for sections such as Models, Providers, Connection settings, or Custom service.
- Click Add model, Add connection, or a similar button.
- Choose a custom configuration instead of a built-in model.
- Open the page where model parameters are entered.
If model management is not visible, check the following:
- Whether the current account can change model settings
- Whether the software is in a simplified mode
- Whether advanced settings must be enabled first
- Whether the current version is too old
- Whether the entry is under workspace, project, or conversation settings
- Whether the software must be restarted before a new menu appears
Do not keep looking for an add-model control inside the chat window. Model configuration is usually a global or workspace setting, not part of the ordinary message box.
3. Create a custom model configuration
On the add page, you typically need the following fields.
1. Configuration name
The name is mainly for local identification. Use something easy to distinguish, such as “Text analysis model,” “Development assistant model,” or “Test connection.”
The name usually does not affect the server call. Avoid names such as “New model” or “Default model.” Once you have several configurations, those labels make it hard to tell which one is actually in use.
2. Provider type
If the software offers several preset providers, choose Custom service, Compatible with a general protocol, or an option with a similar meaning.
Use a custom type because the target model may not be in the client’s built-in provider list. If it follows a general interface protocol the client supports, it can still be connected this way.
If the provider explicitly requires a specific protocol, follow the provider’s documentation. Do not pick a preset only because the name looks similar. The client may then append the wrong request path or send parameters the server does not recognize.
3. Endpoint URL
Paste the prepared service address into the endpoint field. When you enter it:
- Remove spaces before and after the address
- Confirm the correct protocol
- Do not append the access key to the address
- Do not enter the version path twice
- If the provider offers addresses for multiple regions, choose one that is reachable from your current network
If the software has a Test connection button, enter the address and key and test before you start chatting. Do not wait until a conversation fails to discover a bad address.
4. Access key
Enter the key in the authentication field. Some clients hide it as a password. That is normal.
If the test fails, copy the key again and check:
- Whether the full value was copied
- Whether quotation marks were included by mistake
- Whether the key has been revoked or has expired
- Whether the key is allowed to call the target model
- Whether the server restricts source addresses or the scope of calls
5. Model identifier
Enter the exact model identifier from the provider. Case, symbols, and version suffixes can all affect routing. Do not shorten it yourself.
If one service address offers several models, create a separate configuration for each. That is safer than repeatedly editing the same entry, and it makes it easier to compare answer quality and suitable use cases.
6. Context and generation parameters
Common parameters include temperature, maximum output length, and context length.
- Temperature mainly controls how random the output is. Technical Q&A and code generation usually work better with a more stable setting.
- Maximum output length sets the upper limit for a single reply. Too small a value can truncate answers. Too large a value can increase resource use.
- Context length controls how much history the model can refer to, but the usable range is still limited by the server.
- System prompt can define response style, output format, or role boundaries.
Larger values are not automatically better. Stay within what the server supports. If the server rejects a parameter, the client may return a parameter error.
4. After saving, confirm that the model is actually in use
A successful save does not mean the current conversation has switched. Verify in this order:
- Return to the model list and confirm that the new configuration is enabled.
- Manually select the new model in the current conversation’s model selector.
- Start a new conversation for the test.
- Send a simple, recognizable test question.
- Check message details, request logs, or the response to confirm the model identifier that was actually used.
Many desktop assistants distinguish a default model from the model bound to the current conversation. Even after the new configuration is saved, chat will still call the old service if the current conversation remains bound to the previous model. After switching, start a new conversation instead of continuing the test in the old one.
If the software supports project-level, workspace-level, and global configuration, also check which level takes priority. A common order is: the current conversation overrides the project, and the project overrides the global default. Rules differ by product. If a switch does not take effect, check this first.
5. Common failures and how to troubleshoot them
1. The add-model entry cannot be found
Check whether advanced settings are enabled and whether the current account has permission to change configuration. If the software manages settings by workspace, open the specific workspace and look for the model options there.
Some versions show the setup entry only in the first-run wizard. Later, you need to open it from Settings. Restarting the software can help. Do not delete configuration files just to find the entry.
2. Save reports incomplete parameters
This usually means a required field is empty or page validation failed. Check the endpoint, access key, model identifier, and protocol type.
If a field looks filled but is still reported as empty, type one character and delete it. That can clear cases where pasted content was not recognized by the page.
3. The request returns unauthorized
Unauthorized errors are usually related to the key, but they can also mean the authentication method does not match. Confirm that the key is valid, that it has permission to call the model, and that the client sends authentication the way the provider requires.
Do not try to fix authentication by repeatedly changing the model name. Authentication fails before model routing. Handle the key and access permissions first.
4. The request address does not exist
Common causes include a duplicated path, a wrong version path, incompatible handling of a trailing slash, or the client automatically appending an interface path.
Compare the input with the provider’s interface description and decide whether the field expects the root address or the full request URL. If the client supports a custom path, enter the complete path in only one place so it is not joined twice.
5. The model does not exist or cannot be routed
This is usually a wrong model identifier, a model that has not been enabled, or a key without permission for that model. Copy the original identifier from the provider. Do not substitute the display name.
6. The configuration is saved, but the old model is still used
Check the default model, the current conversation model, project-level overrides, and the software cache, in that order. The most reliable approach is to reopen the model selector, explicitly select the new configuration, and then create a new conversation for the test.
7. The reply is empty or truncated
Possible causes include an output length that is too small, an incompatible response format, a network interruption, or extra server limits on request parameters. Start with a simple question and reduce complex parameters. Confirm that basic text chat works before adding more settings.
6. Security and maintenance
A custom model configuration includes access credentials. Follow these rules:
- Do not expose access keys in screenshots, articles, or code repositories
- Use different keys for different environments
- Review key permissions and validity regularly
- Do not use production keys for casual testing
- When sharing a configuration, share only the address, model identifier, and non-sensitive parameters
- If a key is exposed, revoke it immediately and generate a new one
- Keep logs for important conversations, but remove sensitive data first
If several people use the same configuration, use a consistent method for managing keys and make clear who handles permission changes, revocation, and troubleshooting.
7. A recommended verification sequence
To tell whether a problem is in the configuration, the network, or the model itself, verify in layers:
First, check whether the service address is reachable. Second, check whether the authentication information is valid. Third, send the simplest text request and confirm that the model returns content. Fourth, add context, a system prompt, and more complex generation parameters. Only then use it for real development work.
Increasing complexity step by step makes problems easier to locate than sending long text or complex instructions immediately. After setup, keep a parameter list that does not include the key. Record the type of service address, the model identifier, the protocol type, and the intended use case so later migration and maintenance are easier.
Connecting a custom large language model is not finished when the form is saved. You still need to select the model, switch the conversation, verify the interface, and manage credentials. If you follow the order prepare the information, create the configuration, test the connection, switch the conversation, and troubleshoot item by item, you can build a stable, reusable setup even when desktop assistant versions differ.
