manage.py undeploy_llmclient

This module is used to deploy a customer API.

class smarter.apps.llmclient.management.commands.undeploy_llmclient.Command(*args, **kwargs)[source]

Bases: SmarterCommand

Undeploy a customer-facing llmclient API for a Smarter account.

This management command allows administrators to remove a deployed llmclient from a specific account, identified either by account number or company name. The undeployment process deletes the DNS A record associated with the llmclient, effectively disabling its public endpoint at [subdomain].[account-number].api.example.com/llm-client/.

Usage:
  • Specify the account using either --account_number or --company_name.

  • Provide the llmclient’s name (subdomain) via --name.

  • Optionally use --foreground to run the undeployment synchronously.

Command Workflow:
  • Retrieve the account by account number or company name.

  • Locate the llmclient by name within the account.

  • Verify that the llmclient is currently deployed and DNS is verified.

  • Initiate undeployment, either synchronously or as a background Celery task.

  • Output progress and completion messages.

This command is useful for decommissioning llmclients, managing DNS records, and ensuring that endpoints are properly removed when llmclients are no longer needed or require redeployment.

add_arguments(parser)[source]

Add arguments to the command.

handle(*args, **options)[source]

Undeploy a customer API.