LLMClientCustomDomainDNS Model
- class smarter.apps.llm_client.models.LLMClientCustomDomainDNS(*args, **kwargs)[source]
Bases:
TimestampedModelRepresents a DNS record associated with a custom domain for a LLMClient within the Smarter platform.
This model is responsible for storing and managing individual DNS records that are linked to a specific
LLMClientCustomDomain. Each instance of this model corresponds to a single DNS record, such as an A, CNAME, or TXT record, which is required for the proper operation and verification of an llm_client’s custom domain.The primary use case for this model is to facilitate the automation and tracking of DNS configurations necessary for deploying llm_clients on customer-branded domains. By maintaining a record of all DNS entries related to an llm_client’s custom domain, the platform can automate DNS verification, support trouble shooting, and ensure that all required DNS records are present and correctly configured.
Key Features
Associates each DNS record with a specific
LLMClientCustomDomain.Stores the record name, type (such as A, CNAME, TXT), value, and TTL (time-to-live).
Supports management of multiple DNS records per custom domain, enabling complex DNS setups.
Facilitates DNS verification workflows and integration with external DNS providers (e.g., AWS Route 53).
Usage Scenarios
When deploying an llm_client to a custom domain, instances of this model are created to represent the required DNS records (e.g., for domain verification, routing, or certificate issuance).
The platform can query this model to retrieve all DNS records associated with a given custom domain, enabling automated checks and updates.
Used internally by deployment and verification processes to track the status and configuration of DNS records for each llm_client custom domain.
Integration
Closely linked to
LLMClientCustomDomain, providing a one-to-many relationship between a custom domain and its DNS records.Referenced by deployment, verification, and trouble shooting workflows within the Smarter platform.
Notes
This model is intended for internal use and is not exposed directly to end users.
The record fields are validated to ensure compliance with DNS standards.
TTL defaults to 600 seconds but can be customized as needed for specific DNS requirements.
Example
# Create a new DNS record for an llm_client custom domain dns_record = LLMClientCustomDomainDNS.objects.create( custom_domain=my_custom_domain, record_name="_acme-challenge.llm_client.example.com", record_type="TXT", record_value="abc123xyz", record_ttl=600, ) # Retrieve all DNS records for a custom domain records = LLMClientCustomDomainDNS.objects.filter(custom_domain=my_custom_domain)
- Parameters:
id (Unknown) – Primary key: ID
created_at (Unknown) – Created at
updated_at (Unknown) – Updated at
record_name (Unknown) –
Record name
The name of the DNS record (e.g., “_acme-challenge.llm_client.example.com”). Example: “_acme-challenge.llm_client.example.com”
record_type (Unknown) –
Record type
The type of DNS record (e.g., “A”, “CNAME”, “TXT”). Example: “TXT”
record_value (Unknown) –
Record value
The value of the DNS record (e.g., “abc123xyz”). Example: “abc123xyz”
record_ttl (Unknown) –
Record ttl
The time-to-live (TTL) for the DNS record, in seconds. Example: 600
Relationship fields:
- Parameters:
custom_domain (Unknown) –
Custom domain (related name:
llmclientcustomdomaindns)The LLMClientCustomDomain that this DNS record is associated with. Example: LLMClientCustomDomain(id=1, domain=”example.com”)
Reverse relationships:
- Parameters:
llmclient (Unknown) – The llm client of this llm client custom domain dns (related name of
subdomain)
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- exception NotUpdated
Bases:
ObjectNotUpdated,DatabaseError
- created_at
-
Created at
Timestamp indicating when the model instance was created.
This field is automatically set to the current date and time when the instance is first created. It is indexed in the database for efficient querying.
- Type:
Type
- custom_domain
ForeignKeytoLLMClientCustomDomainCustom domain (related name:
llmclientcustomdomaindns)The LLMClientCustomDomain that this DNS record is associated with. Example: LLMClientCustomDomain(id=1, domain=”example.com”)
- Type:
Type
- custom_domain_id
Internal field, use
custom_domaininstead.
- id
-
Primary key: ID
- Type:
Type
- llmclient
Reverse
OneToOneFieldfromLLMClientThe llm client of this llm client custom domain dns (related name of
subdomain)- Type:
Type
- objects = <django.db.models.Manager object>
- record_name
-
Record name
The name of the DNS record (e.g., “_acme-challenge.llm_client.example.com”). Example: “_acme-challenge.llm_client.example.com”
- Type:
Type
- record_ttl
-
Record ttl
The time-to-live (TTL) for the DNS record, in seconds. Example: 600
- Type:
Type
- record_type
-
Record type
The type of DNS record (e.g., “A”, “CNAME”, “TXT”). Example: “TXT”
- Type:
Type
- record_value
-
Record value
The value of the DNS record (e.g., “abc123xyz”). Example: “abc123xyz”
- Type:
Type
- updated_at
-
Updated at
Timestamp indicating when the model instance was last updated.
This field is automatically updated to the current date and time whenever the instance is saved. It is indexed in the database for efficient querying.
- Type:
Type