> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/textual/textual-install-administer/configuring-textual/enable-and-configure-textual-features/textual-config-model-based-custom-entity-type.md).

# Enabling model-based custom entity types

Model-based custom entity types require a connection to an LLM.

You can use the configured [default provider and model](/textual/textual-install-administer/configuring-textual/enable-and-configure-textual-features/configuring-the-default-llm-provider-and-model.md), or select a provider and model to use specifically for model-based entity types.

You must also provide the URL for the Textual API.

## Setting the URL for the Textual API

To support model-based custom entity types, the ML container must be able to connect to the Textual API.

You set the following environment variable to the public base URL of the Textual API:

`SOLAR_API_URL`

For example, `https://textual.example.com`.

The URL must be accessible from the ML container.

## Selecting a custom provider and model

If you do not specify a provider and model for model-based custom entity types, Textual uses the [default provider and model](/textual/textual-install-administer/configuring-textual/enable-and-configure-textual-features/configuring-the-default-llm-provider-and-model.md).

To identify a specific provider and model to use for model-based custom entity types, set the following environment variables:

* `MODEL_BASED_ENTITIES_LLM_PROVIDER` - The LLM provider to use for model-based custom entity types. For information about setting up connections to LLM providers, go to [Configuring connections to LLM providers](/textual/textual-install-administer/configuring-textual/enable-and-configure-textual-features/configuring-connections-to-llm-providers.md).
* `MODEL_BASED_ENTITIES_LLM_MODEL_NAME` - The model to use for model-based custom entity types.

## Connection timeout and retry settings

You can also configure information the following optional settings:

* `MODEL_BASED_ENTITIES_LLM_TIMEOUT_IN_SECONDS` - The request timeout in seconds. The default value is 300.
* `MODEL_BASED_ENTITIES_LLM_RETRY_COUNT` - The number of times to retry when a request fails. The default value is 5.
* `MODEL_BASED_ENTITIES_LLM_SLOW_REQUEST_THRESHOLD_SECONDS` - If the request exceeds this number of seconds, then log a warning. The default value is 120.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tonic.ai/textual/textual-install-administer/configuring-textual/enable-and-configure-textual-features/textual-config-model-based-custom-entity-type.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
