Smarter Settings
Smarter common configuration module.
smarter_settings is one instance of Settings, which
combines a Pydantic model per topic. Each topic’s module, in the package
smarter.common.conf.settings, holds its fields, their validators, and the properties
derived from them. A new setting goes into the topic it belongs to.
- pydantic model smarter.common.conf.Settings[source]
See: https://docs.pydantic.dev/latest/concepts/pydantic_settings/.
Smarter derived settings. This is intended to be instantiated as an immutable singleton object called smarter_settings. smarter_settings contains superseding, validated, and derived settings values for the platform.
This class implements a consistent set of rules for initializing configuration values from multiple sources, including environment variables, .env file, and default values defined in this class. It additionally ensures that all configuration values are strongly typed and validated.
Where applicable, smarter_settings supersede Django settings values. That is, smarter_settings should be used in preference to Django settings wherever possible. Django settings are initialized from smarter_settings values where applicable.
Notes:
smarter_settings values are immutable after instantiation.
Every property/attribute in smarter_settings has a value. If a value is None then it is intentionally None.
Sensitive values are stored as pydantic SecretStr types.
- smarter_settings values are initialized according to the following prioritization sequence:
constructor. This is discouraged. prefer to use .env file or environment variables.
.env file. When sourced, these override existing environment variables.
environment variables.
settings_defaults
The dump property returns a dictionary of all configuration values.
smarter_settings values should be accessed via the smarter_settings singleton instance when possible.
Show JSON schema
{ "title": "Settings", "description": "See: https://docs.pydantic.dev/latest/concepts/pydantic_settings/.\n\nSmarter derived settings. This is intended to be instantiated as\nan immutable singleton object called `smarter_settings`. smarter_settings\ncontains superseding, validated, and derived settings values for the platform.\n\nThis class implements a consistent set of rules for initializing configuration\nvalues from multiple sources, including environment variables, `.env` file,\nand default values defined in this class. It additionally ensures that all\nconfiguration values are strongly typed and validated.\n\nWhere applicable, smarter_settings supersede Django settings values. That is,\nsmarter_settings should be used in preference to Django settings wherever\npossible. Django settings are initialized from smarter_settings values where\napplicable.\n\nNotes:\n-----------------\n- smarter_settings values are immutable after instantiation.\n- Every property/attribute in smarter_settings has a value.\n If a value is None then it is intentionally None.\n- Sensitive values are stored as pydantic SecretStr types.\n- smarter_settings values are initialized according to the following prioritization sequence:\n 1. constructor. This is discouraged. prefer to use .env file or environment variables.\n 2. `.env` file. When sourced, these override existing environment variables.\n 3. environment variables.\n 4. settings_defaults\n- The dump property returns a dictionary of all configuration values.\n- smarter_settings values should be accessed via the smarter_settings singleton instance when possible.", "type": "object", "properties": { "llmclient_tasks_create_dns_record": { "default": true, "description": "True if DNS records should be created for llmclient tasks.", "title": "LLMClient Tasks Create DNS Record", "type": "boolean" }, "llmclient_tasks_create_ingress_manifest": { "default": true, "description": "True if ingress manifests should be created for llmclient tasks.", "title": "LLMClient Tasks Create Ingress Manifest", "type": "boolean" }, "llmclient_tasks_default_ttl": { "default": 600, "description": "Default TTL (time to live) for DNS records created in AWS Route53 during LLMClient deployment.", "minimum": 0, "title": "LLMClient Tasks Default TTL", "type": "integer" }, "llmclient_tasks_celery_max_retries": { "default": 3, "description": "Maximum number of retries for llmclient tasks in Celery.", "exclusiveMinimum": 0, "title": "LLMClient Tasks Celery Max Retries", "type": "integer" }, "llmclient_tasks_celery_retry_backoff": { "default": true, "description": "If True, enables exponential backoff for Celery task retries related to LLMClient deployment and management", "title": "LLMClient Tasks Celery Retry Backoff", "type": "boolean" }, "llmclient_tasks_celery_task_queue": { "default": "default_celery_task_queue", "description": "The Celery task queue name for llmclient tasks.", "title": "LLMClient Tasks Celery Task Queue", "type": "string" }, "infrastructure_tasks_celery_task_queue": { "default": "infrastructure_celery_task_queue", "description": "The Celery task queue name for infrastructure tasks, which deploy, verify and destroy cloud, Kubernetes and DNS resources.", "title": "Infrastructure Tasks Celery Task Queue", "type": "string" }, "admin_username": { "default": "admin", "description": "The username of the platform's superuser, which manage.py initialize_platform creates.", "examples": [ "admin" ], "title": "Administrator Username", "type": "string" }, "admin_password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The password of the platform's superuser, which manage.py initialize_platform creates.", "examples": [ "your-admin-password" ], "title": "Administrator Password" }, "sensitive_files_amnesty_patterns": { "default": [ "^/$", "^/static(/.*)?$", "^/api/v\\d+(\\.\\d+)?/.+", "^/api/web/.+", "^/dashboard(/.*)?$", "^/docs/manifest(/.*)?$", "^/docs/json-schema(/.*)?$", "^/config/?$", "^/login/?$", "^/admin/?$" ], "description": "List of regex patterns for sensitive file amnesty.", "examples": [ "^/dashboard/account/password-reset-link/[^/]+/[^/]+/$", "^/api(/.*)?$", "^/admin(/.*)?$" ], "items": { "format": "regex", "type": "string" }, "title": "Sensitive Files Amnesty Patterns", "type": "array" }, "fernet_encryption_key": { "default": "**********", "description": "The Fernet encryption key used for encrypting Smarter Secrets data.", "examples": [ "gAAAAABh..." ], "format": "password", "title": "Fernet Encryption Key", "type": "string", "writeOnly": true }, "internal_ip_prefixes": { "default": [ "192.168." ], "description": "A list of internal IP prefixes used for security and middleware features.", "examples": [ "192.168." ], "items": { "type": "string" }, "title": "Internal IP Prefixes", "type": "array" }, "local_hosts": { "default": [ "localhost", "127.0.0.1", "localhost:9357", "127.0.0.1:9357", "localhost:5173", "testserver" ], "description": "A list of hostnames considered local for development and testing purposes.", "examples": [ "localhost", "127.0.0.1", "localhost:9357", "127.0.0.1:9357", "localhost:5173", "testserver" ], "items": { "type": "string" }, "title": "Local Hosts", "type": "array" }, "secret_key": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The Django secret key for cryptographic signing.", "examples": [ "your-django-secret-key" ], "title": "Django Secret Key" }, "throttle_rate_anon": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "120/minute", "description": "The request rate limit of each anonymous client, by IP address. None disables it.", "examples": [ "120/minute", "10/second", "none" ], "title": "Anonymous Throttle Rate" }, "throttle_rate_user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "600/minute", "description": "The request rate limit of each authenticated user. None disables it.", "examples": [ "600/minute", "20/second", "none" ], "title": "User Throttle Rate" }, "max_tool_rounds": { "default": 5, "description": "The most requests of one prompt that offer the LLM its tools.", "minimum": 1, "title": "Max Tool Rounds", "type": "integer" }, "prompt_history_max_age": { "default": 90, "description": "Days to keep chat sessions and their prompt history before they are deleted.", "minimum": 1, "title": "Prompt History Max Age", "type": "integer" }, "plugin_max_data_results": { "default": 50, "description": "A global maximum number of data row results that can be returned by any Smarter plugin.", "exclusiveMinimum": 0, "title": "Plugin Max Data Results", "type": "integer" }, "extension_registry_url": { "default": "https://smarter-sh.github.io/extensions-registry/index.json", "description": "The url of the Smarter Extension registry's signed index, index.json.", "examples": [ "https://smarter-sh.github.io/extensions-registry/index.json" ], "title": "Extension Registry URL", "type": "string" }, "extension_registry_public_key": { "default": "i0kR0g3ZEf6YzyyjnQbIwq85D7QGwTrvzubYsw6sdtg=", "description": "The base64 Ed25519 public key that verifies the extension registry's index. Empty disables the registry.", "title": "Extension Registry Public Key", "type": "string" }, "mcpserver_rate_limit": { "default": 1200, "description": "The maximum number of requests per minute that one client IP address may send to the MCPServer's endpoints. 0 disables the limit.", "minimum": 0, "title": "MCP Server Rate Limit", "type": "integer" }, "llm_default_provider": { "default": "openai", "description": "The default LLM provider to use for language model interactions.", "examples": [ "openai", "anthropic", "gemini", "llama" ], "title": "Default LLM Provider", "type": "string" }, "llm_default_system_role": { "default": "You are a helpful llmclient. When given the opportunity to utilize function calling, you should always do so. This will allow you to provide the best possible responses to the user. If you are unable to provide a response, you should prompt the user for more information. If you are still unable to provide a response, you should inform the user that you are unable to help them at this time.", "description": "The default system role prompt to use for language model interactions.", "examples": [ "You are a helpful llmclient..." ], "title": "Default LLM System Role", "type": "string" }, "llm_default_temperature": { "default": 1.0, "description": "The default temperature to use for language model interactions.", "examples": [ 0.0, 0.5, 1.0 ], "title": "Default LLM Temperature", "type": "number" }, "llm_default_max_tokens": { "default": 2048, "description": "The default maximum number of tokens to generate for language model interactions.", "examples": [ 256, 512, 1024, 2048 ], "minimum": 1, "title": "Default LLM Max Tokens", "type": "integer" }, "prompt_threads": { "default": 32, "description": "The threads in each web server process that run streamed chat prompts.", "minimum": 1, "title": "Prompt Threads", "type": "integer" }, "github_token": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The platform's GitHub token, from GITHUB_TOKEN, for the GitHub REST api requests that retrieve remote SkillPlugin skills, and that open the bug reports of the platform's staff. Masked by pydantic SecretStr.", "examples": [ "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ], "title": "GitHub Token" }, "social_auth_google_oauth2_key": { "default": "**********", "description": "The OAuth2 key for Google social authentication. Masked by pydantic SecretStr.", "examples": [ "your-google-oauth2-key" ], "format": "password", "title": "Google OAuth2 Key", "type": "string", "writeOnly": true }, "social_auth_google_oauth2_secret": { "default": "**********", "description": "The OAuth2 secret for Google social authentication. Masked by pydantic SecretStr.", "examples": [ "your-google-oauth2-secret" ], "format": "password", "title": "Google OAuth2 Secret", "type": "string", "writeOnly": true }, "social_auth_github_key": { "default": "**********", "description": "The OAuth2 key for GitHub social authentication. Masked by pydantic SecretStr.", "examples": [ "your-github-oauth2-key" ], "format": "password", "title": "GitHub OAuth2 Key", "type": "string", "writeOnly": true }, "social_auth_github_secret": { "default": "**********", "description": "The OAuth2 secret for GitHub social authentication. Masked by pydantic SecretStr.", "examples": [ "your-github-oauth2-secret" ], "format": "password", "title": "GitHub OAuth2 Secret", "type": "string", "writeOnly": true }, "social_auth_linkedin_oauth2_key": { "default": "**********", "description": "The OAuth2 key for LinkedIn social authentication. Masked by pydantic SecretStr.", "examples": [ "your-linkedin-oauth2-key" ], "format": "password", "title": "LinkedIn OAuth2 Key", "type": "string", "writeOnly": true }, "social_auth_linkedin_oauth2_secret": { "default": "**********", "description": "The OAuth2 secret for LinkedIn social authentication. Masked by pydantic SecretStr.", "examples": [ "your-linkedin-oauth2-secret" ], "format": "password", "title": "LinkedIn OAuth2 Secret", "type": "string", "writeOnly": true }, "slack_bot_token": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "A Slack app's bot token, xoxb-..., which the platform posts its Kubernetes jobs' logs to Slack with. Masked by pydantic SecretStr.", "examples": [ "xoxb-xxxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx" ], "title": "Slack Bot Token" }, "stripe_live_secret_key": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "DEPRECATED: The secret key for Stripe live environment.", "examples": [ "sk_live_xxxxxxxxxxxxxxxxxxxxxxxx" ], "title": "Stripe Live Secret Key" }, "stripe_test_secret_key": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "DEPRECATED: The secret key for Stripe test environment.", "examples": [ "sk_test_xxxxxxxxxxxxxxxxxxxxxxxx" ], "title": "Stripe Test Secret Key" }, "debug_mode": { "default": true, "description": "True if debug mode is enabled. This enables verbose logging and other debug features.", "title": "Debug Mode", "type": "boolean" }, "dump_defaults": { "default": false, "description": "True if default values should be dumped for debugging purposes.", "title": "Dump Defaults", "type": "boolean" }, "developer_mode": { "default": true, "description": "True if developer mode is enabled. Used as a means to configure a production Docker container to run locally for student use.", "title": "Developer Mode", "type": "boolean" }, "enable_dropzone_manifest_apply": { "default": true, "description": "True if the file drop zone feature is enabled based on the current environment.", "title": "Enable File Drop Zone", "type": "boolean" }, "enable_vectorstore": { "default": true, "description": "True if the vectorstore feature is enabled based on the current environment.", "title": "Enable Vectorstore", "type": "boolean" }, "enable_proxy": { "default": true, "description": "True if the proxy feature is enabled based on the current environment.", "title": "Enable Proxy", "type": "boolean" }, "enable_dashboard_server_logs": { "default": true, "description": "True if the terminal app feature is enabled based on the current environment.", "title": "Enabled Terminal App", "type": "boolean" }, "enable_web_console_terminal": { "default": true, "description": "True if superusers can open a bash shell inside the server's container from the web console's Terminal page. Off by default.", "title": "Enable Web Console Terminal", "type": "boolean" }, "static_files_on_cdn": { "default": false, "description": "True if the platform's static files, the web console's scripts among them, are uploaded to the environment's S3 bucket and served from its CDN. Off by default: the server serves them.", "title": "Static Files on the CDN", "type": "boolean" }, "enable_dashboard_passthrough_prompt": { "default": true, "description": "True if the passthrough prompt feature is enabled based on the current environment.", "title": "Enable Passthrough Prompt", "type": "boolean" }, "log_level": { "default": 10, "description": "The logging level for the platform based on Python logging levels: logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL", "examples": [ 10, 20, 30, 40, 50 ], "maximum": 50, "minimum": 0, "title": "Logging Level", "type": "integer" }, "verbose_logging": { "default": true, "description": "Whether to enable verbose logging for debugging purposes.", "examples": [ true, false ], "title": "Verbose Logging", "type": "boolean" }, "mysql_root_username": { "default": "root", "description": "The database server's administrator, whom manage.py load_from_github --run_scripts passes to a repository's scripts.", "examples": [ "root" ], "title": "MySQL Root Username", "type": "string" }, "mysql_root_password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The password of the database server's administrator, mysql_root_username.", "examples": [ "your-root-password" ], "title": "MySQL Root Password" }, "mysql_host": { "default": "smarter-mariadb", "description": "The host name of the platform's database server.", "examples": [ "smarter-mariadb", "mysql.example.com" ], "title": "MySQL Host", "type": "string" }, "mysql_port": { "default": 3306, "description": "The TCP port of the platform's database server.", "examples": [ 3306 ], "maximum": 65535, "minimum": 1, "title": "MySQL Port", "type": "integer" }, "mysql_database": { "default": "smarter", "description": "The name of the platform's database.", "examples": [ "smarter" ], "title": "MySQL Database", "type": "string" }, "mysql_user": { "default": "smarter", "description": "The database user that the platform connects as.", "examples": [ "smarter" ], "title": "MySQL User", "type": "string" }, "mysql_password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The password of mysql_user, the database user that the platform connects as.", "examples": [ "your-database-password" ], "title": "MySQL Password" }, "database_read_timeout": { "default": 0, "description": "The seconds that a query of the platform's database may wait for the server's reply before it fails. 0 for no timeout.", "minimum": 0, "title": "Database Read Timeout", "type": "integer" }, "cache_expiration": { "default": 60, "description": "The cache expiration time in seconds for cached data.", "exclusiveMinimum": 0, "title": "Cache Expiration", "type": "integer" }, "chat_cache_expiration": { "default": 5, "description": "The prompt cache expiration time in seconds for cached prompt data.", "exclusiveMinimum": 0, "title": "Prompt Cache Expiration", "type": "integer" }, "prompt_response_cache_expiration": { "default": 3600, "description": "Seconds to cache the LLM's answer to the first message of a conversation. 0 disables the cache.", "minimum": 0, "title": "Prompt Response Cache Expiration", "type": "integer" }, "listview_cache_expiration": { "default": 3600, "description": "The cache expiration time in seconds for the pages of the web console's list views.", "exclusiveMinimum": 0, "title": "List View Cache Expiration", "type": "integer" }, "llmclient_cache_expiration": { "default": 300, "description": "The llmclient cache expiration time in seconds for cached llmclient data.", "exclusiveMinimum": 0, "title": "LLMClient Cache Expiration", "type": "integer" }, "branding_corporate_name": { "default": "Lawrence P. McDaniel", "description": "The corporate name used for branding purposes throughout the platform.", "examples": [ "Acme Corporation" ], "title": "Branding Corporate Name", "type": "string" }, "branding_support_phone_number": { "default": "+1 (617) 555-6172", "description": "The support phone number used for branding purposes throughout the platform.", "examples": [ "+1-800-555-1234" ], "title": "Branding Support Phone Number", "type": "string" }, "branding_support_email": { "default": "lpm0073@gmail.com", "description": "The support email address used for branding purposes throughout the platform.", "format": "email", "title": "Branding Support Email", "type": "string" }, "branding_address1": { "default": "1015 Chula Vista Ave", "description": "The corporate address used for branding purposes throughout the platform.", "examples": [ "123 Main St, Anytown, USA" ], "title": "Branding Address", "type": "string" }, "branding_address2": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "description": "The second line of the corporate address used for branding purposes throughout the platform.", "examples": [ "Suite 100" ], "title": "Branding Address Line 2" }, "branding_city": { "default": "Burlingame", "description": "The corporate city used for branding purposes throughout the platform.", "examples": [ "Anytown" ], "title": "Branding City", "type": "string" }, "branding_state": { "default": "CA", "description": "The corporate state used for branding purposes throughout the platform.", "examples": [ "CA" ], "title": "Branding State", "type": "string" }, "branding_postal_code": { "default": "94010", "description": "The corporate postal code used for branding purposes throughout the platform.", "examples": [ "12345" ], "title": "Branding Postal Code", "type": "string" }, "branding_country": { "default": "USA", "description": "The corporate country used for branding purposes throughout the platform.", "examples": [ "USA" ], "title": "Branding Country", "type": "string" }, "branding_currency": { "default": "USD", "description": "The currency used for branding purposes throughout the platform.", "examples": [ "USD" ], "title": "Branding Currency", "type": "string" }, "branding_timezone": { "default": "America/San_Francisco", "description": "The timezone used for branding purposes throughout the platform.", "examples": [ "America/New_York" ], "title": "Branding Timezone", "type": "string" }, "branding_contact_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://lawrencemcdaniel.com/contact/", "description": "The contact URL used for branding purposes throughout the platform.", "examples": [ "https://www.example.com/contact" ], "title": "Branding Contact URL" }, "branding_primary_contact": { "default": "Lawrence McDaniel", "description": "The name of the person who is the technical point of contact for this platform.", "examples": [ "Lawrence McDaniel" ], "title": "Branding Primary Contact", "type": "string" }, "branding_support_hours": { "default": "MON-FRI 9:00 AM - 5:00 PM GMT-6 (CST)", "description": "The support hours used for branding purposes throughout the platform.", "examples": [ "Mon-Fri 9am-5pm EST" ], "title": "Branding Support Hours", "type": "string" }, "branding_url_facebook": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://facebook.com/", "description": "The Facebook URL used for branding purposes throughout the platform.", "examples": [ "https://www.facebook.com/example" ], "title": "Branding URL Facebook" }, "branding_url_twitter": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://x.com/fullstackwlarry", "description": "The Twitter URL used for branding purposes throughout the platform.", "examples": [ "https://www.twitter.com/example" ], "title": "Branding URL Twitter" }, "branding_url_linkedin": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://www.linkedin.com/in/lawrencemcdaniel/", "description": "The LinkedIn URL used for branding purposes throughout the platform.", "examples": [ "https://www.linkedin.com/company/example" ], "title": "Branding URL LinkedIn" }, "branding_url_slack": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://join.slack.com/t/thesmarterproject/shared_invite/zt-4f0t6v46q-e2c5Of4hS4fBr_XwfQARCw", "description": "The invite link of the Slack workspace that the platform's emails invite users to.", "examples": [ "https://join.slack.com/t/example/shared_invite/zt-example" ], "title": "Branding URL Slack" }, "logo": { "anyOf": [ { "format": "uri", "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://cdn.smarter.sh/images/logo/smarter-crop.png", "description": "The URL to the platform's logo image.", "examples": [ "https://cdn.example.com/logo.png" ], "title": "Platform Logo URL" }, "marketing_site_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://smarter.sh/", "description": "The URL to the platform's marketing site.", "examples": [ "https://www.example.com" ], "title": "Marketing Site URL" }, "init_info": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Init Info" }, "loki_url": { "default": "", "description": "The base url of the Loki that stores the platform's pod logs, e.g. http://smarter-loki:3100. Empty: there is none.", "examples": [ "http://smarter-loki:3100" ], "title": "Loki URL", "type": "string" }, "default_missing_value": { "default": "SET-ME-PLEASE", "description": "Default missing value placeholder string. Used for consistency across settings.", "examples": [ "SET-ME-PLEASE" ], "title": "Default Missing Value", "type": "string" }, "django_default_file_storage": { "default": "storages.backends.s3boto3.S3Boto3Storage", "description": "The default Django file storage backend.", "examples": [ "storages.backends.s3boto3.S3Boto3Storage", "django.core.files.storage.FileSystemStorage" ], "title": "Django Default File Storage Backend", "type": "string" }, "environment": { "default": "local", "description": "The deployment environment for the platform.", "examples": [ "local", "alpha", "beta", "next", "prod" ], "title": "Deployment Environment", "type": "string" }, "platform_subdomain": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "local", "description": "The subdomain for the platform, used in constructing URLs and email addresses.", "examples": [ "platform", "ubc" ], "title": "Platform Subdomain" }, "root_domain": { "default": "smarter.com", "description": "The root domain for the platform.", "examples": [ "example.com" ], "title": "Root Domain", "type": "string" }, "settings_output": { "default": false, "description": "Flag to enable or disable output of settings for debugging purposes.", "examples": [ true, false ], "title": "Settings Output", "type": "boolean" }, "shared_resource_identifier": { "default": "smarter", "description": "Smarter 1-word identifier to be used when naming any shared resource.", "examples": [ "smarter", "mycompany", "myproject" ], "title": "Shared Resource Identifier", "type": "string" }, "aws_profile": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "lawrence", "description": "The AWS profile to use for authentication. If present, this will take precedence over AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.", "examples": [ "default", "smarter-profile" ], "title": "AWS Profile" }, "aws_access_key_id": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The AWS access key ID for authentication. Used if AWS_PROFILE is not set. Masked by pydantic SecretStr.", "examples": [ "^AKIA[0-9A-Z]{16}$" ], "title": "AWS Access Key ID" }, "aws_secret_access_key": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The AWS secret access key for authentication. Used if AWS_PROFILE is not set. Masked by pydantic SecretStr.", "examples": [ "^[0-9a-zA-Z/+]{40}$" ], "title": "AWS Secret Access Key" }, "aws_regions": { "default": [ "ap-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-northeast-2", "ap-northeast-1", "il-central-1", "ca-central-1", "sa-east-1", "ca-west-1", "mx-central-1", "ap-southeast-1", "ap-southeast-2", "eu-central-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2" ], "description": "A list of AWS regions considered valid for this platform.", "examples": [ "us-east-1", "us-west-2", "eu-west-1" ], "items": { "type": "string" }, "title": "AWS Regions", "type": "array" }, "aws_region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The single AWS region in which all AWS service clients will operate.", "examples": [ "us-east-1", "us-west-2", "eu-west-1" ], "title": "AWS Region" }, "cloud_provider": { "default": "aws", "description": "The cloud provider of the platform's infrastructure services: DNS, TLS certificates, and the Kubernetes cluster's credentials.", "examples": [ "aws", "memory" ], "title": "Cloud Provider", "type": "string" }, "aws_eks_cluster_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "smarter-ubc-ca-202602121853", "description": "The name of the AWS EKS cluster used for hosting applications.", "examples": [ "apps-hosting-service" ], "title": "AWS EKS Cluster Name" }, "llmhost_node_role_arn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The IAM role of the node groups that Smarter creates for LLMHosts.", "examples": [ "arn:aws:iam::123456789012:role/eks-node-role" ], "title": "LLMHost Node Role ARN" }, "llmhost_node_subnet_ids": { "default": [], "description": "The subnets of the node groups that Smarter creates for LLMHosts.", "examples": [ [ "subnet-0123456789abcdef0" ] ], "items": { "type": "string" }, "title": "LLMHost Node Subnet IDs", "type": "array" }, "email_admin": { "default": "lpm0073@gmail.com", "description": "The administrator email address used for system notifications and alerts.", "examples": [ "admin@example.com" ], "format": "email", "title": "Administrator Email Address", "type": "string" }, "mailchimp_api_key": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The API key for Mailchimp services. Masked by pydantic SecretStr.", "examples": [ "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ], "title": "Mailchimp API Key" }, "mailchimp_list_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "272208fe44", "description": "The Mailchimp list ID for managing email subscribers.", "examples": [ "a1b2c3d4e5" ], "title": "Mailchimp List ID" }, "smtp_sender": { "anyOf": [ { "format": "email", "type": "string" }, { "type": "null" } ], "default": "no-reply@smarter.sh", "description": "The sender email address for SMTP emails.", "examples": [ "sender@example.com" ], "title": "SMTP Sender Email Address" }, "smtp_password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The SMTP password for authentication. Assumed to be an AWS SES-generated IAM keypair secret.", "examples": [ "your-smtp-password" ], "title": "SMTP Password" }, "smtp_port": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 587, "description": "The SMTP port for sending emails.", "examples": [ 25, 465, 587 ], "title": "SMTP Port Number" }, "smtp_use_ssl": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether to use SSL for SMTP connections.", "examples": [ true, false ], "title": "SMTP Use SSL" }, "smtp_use_tls": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Whether to use TLS for SMTP connections.", "examples": [ true, false ], "title": "SMTP Use TLS" }, "smtp_username": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The SMTP username for authentication. Assumed to be an AWS SES-generatred IAM keypair username.", "examples": [ "your-smtp-username" ], "title": "SMTP Username" } }, "additionalProperties": false }
- Config:
strict: bool = True
frozen: bool = True
- Fields:
- Validators:
Topics
- pydantic model smarter.common.conf.settings.platform.PlatformSettings[source]
The platform’s identity: its environment, root domain, platform subdomain, and shared resources.
Show JSON schema
{ "title": "PlatformSettings", "description": "The platform's identity: its environment, root domain, platform subdomain, and shared resources.", "type": "object", "properties": { "init_info": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Init Info" }, "loki_url": { "default": "", "description": "The base url of the Loki that stores the platform's pod logs, e.g. http://smarter-loki:3100. Empty: there is none.", "examples": [ "http://smarter-loki:3100" ], "title": "Loki URL", "type": "string" }, "default_missing_value": { "default": "SET-ME-PLEASE", "description": "Default missing value placeholder string. Used for consistency across settings.", "examples": [ "SET-ME-PLEASE" ], "title": "Default Missing Value", "type": "string" }, "django_default_file_storage": { "default": "storages.backends.s3boto3.S3Boto3Storage", "description": "The default Django file storage backend.", "examples": [ "storages.backends.s3boto3.S3Boto3Storage", "django.core.files.storage.FileSystemStorage" ], "title": "Django Default File Storage Backend", "type": "string" }, "environment": { "default": "local", "description": "The deployment environment for the platform.", "examples": [ "local", "alpha", "beta", "next", "prod" ], "title": "Deployment Environment", "type": "string" }, "platform_subdomain": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "local", "description": "The subdomain for the platform, used in constructing URLs and email addresses.", "examples": [ "platform", "ubc" ], "title": "Platform Subdomain" }, "root_domain": { "default": "smarter.com", "description": "The root domain for the platform.", "examples": [ "example.com" ], "title": "Root Domain", "type": "string" }, "settings_output": { "default": false, "description": "Flag to enable or disable output of settings for debugging purposes.", "examples": [ true, false ], "title": "Settings Output", "type": "boolean" }, "shared_resource_identifier": { "default": "smarter", "description": "Smarter 1-word identifier to be used when naming any shared resource.", "examples": [ "smarter", "mycompany", "myproject" ], "title": "Shared Resource Identifier", "type": "string" } } }
- Fields:
- Validators:
- field default_missing_value: str = 'SET-ME-PLEASE'
Default missing value placeholder string.
Used for consistency across settings. This string is used as a placeholder for configuration values that have not been set. It indicates that the value is missing and should be provided by the user or administrator. Using a consistent placeholder helps identify unset values during debugging and configuration reviews.
- Type:
- Default:
Value from
DEFAULT_MISSING_VALUE- Raises:
SmarterConfigurationError – If the value is not a string.
Default missing value placeholder string. Used for consistency across settings.
- field django_default_file_storage: str = 'storages.backends.s3boto3.S3Boto3Storage'
The default Django file storage backend.
This setting determines where Django will store uploaded files by default. It can be configured to use different storage backends, such as Amazon S3 or the local file system, depending on the needs of the application and its deployment environment.
- Type:
- Default:
Value from
settings_defaults.DJANGO_DEFAULT_FILE_STORAGE- Raises:
SmarterConfigurationError – If the value is not a string.
The default Django file storage backend.
- field environment: str = 'local'
The deployment environment for the platform.
This setting indicates the environment in which the platform is running, such as development, staging, or production. It can be used to adjust behavior and configurations based on the environment.
- Type:
- Default:
Value from
settings_defaults.ENVIRONMENT- Raises:
SmarterConfigurationError – If the value is not a valid environment name from SmarterEnvironments.all
The deployment environment for the platform.
- Validated by:
- field loki_url: str = ''
The base url of the Loki that stores the last 72 hours of the platform’s pod logs.
The Helm chart runs Loki in the platform’s namespace, and sets this to its Service, e.g.
http://smarter-loki:3100. The MCPServer’s staff-only log tools query it, throughsmarter.apps.infrastructure.services.infrastructure.logs. While it is empty, e.g. in local development, the log tools say that there is no log store. :type: str :default: Value fromsettings_defaults.LOKI_URL:raises SmarterConfigurationError: If the value is not an http or https url.The base url of the Loki that stores the platform’s pod logs, e.g. http://smarter-loki:3100. Empty: there is none.
- Validated by:
- field platform_subdomain: str | None = 'local'
The subdomain for the platform, used in constructing URLs and email addresses.
- field root_domain: str = 'smarter.com'
The root domain for the platform.
This setting specifies the primary domain name used by the platform. It is used for constructing URLs, email addresses, and other domain-related configurations.
- Type:
- Default:
Value from
settings_defaults.ROOT_DOMAIN- Raises:
SmarterConfigurationError – If the value is not a valid domain name.
The root domain for the platform.
- Validated by:
- field settings_output: bool = False
If True, enables verbose output of Smarter run-time settings during Django startup.
This will generate a multi-line header in new terminal windows launched from Kubernetes pods running Smarter services.
- Type:
- Default:
Value from
settings_defaults.SETTINGS_OUTPUT- Raises:
SmarterConfigurationError – If the value is not a boolean.
Flag to enable or disable output of settings for debugging purposes.
- Validated by:
A single, lowercase word used as a unique identifier for all shared resources across the Smarter platform.
This value is used as a prefix or namespace when naming resources that are shared between services, environments, or deployments—such as S3 buckets, Kubernetes namespaces, or other cloud resources. It ensures that resource names are consistent, easily identifiable, and do not conflict with those from other projects or organizations.
Important
The identifier should be a simple word, using only lowercase letters.
Avoid changing this value after initial deployment, as it would likely lead to resource naming conflicts and unintended consequences in Kubernetes, cloud infrastructure, and other services relying on consistent naming conventions.
- Typical usage:
As a prefix for cloud resource names (e.g.,
smarter-platform-alpha)To distinguish resources in multi-tenant or multi-environment deployments
For automated naming conventions in infrastructure-as-code and deployment scripts
- Examples:
smartermycompanymyproject
- Type:
- Default:
Value from
settings_defaults.SHARED_RESOURCE_IDENTIFIER- Raises:
SmarterConfigurationError – If the value is not a string.
Smarter 1-word identifier to be used when naming any shared resource.
- Validated by:
- validator validate_environment » environment[source]
Validates the environment field.
- validator validate_loki_url » loki_url[source]
Validates the ‘loki_url’ field: an http or https url without a trailing slash, or empty.
- validator validate_root_domain » root_domain[source]
Validates the root_domain field.
If the value is not set, returns the default root domain.
- validator validate_settings_output » settings_output[source]
Validates the settings_output field.
- pydantic model smarter.common.conf.settings.domains.DomainSettings[source]
The domains, urls, hosts and bucket names that are derived from the platform’s identity.
Show JSON schema
{ "title": "DomainSettings", "description": "The domains, urls, hosts and bucket names that are derived from the platform's identity.", "type": "object", "properties": { "init_info": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Init Info" }, "loki_url": { "default": "", "description": "The base url of the Loki that stores the platform's pod logs, e.g. http://smarter-loki:3100. Empty: there is none.", "examples": [ "http://smarter-loki:3100" ], "title": "Loki URL", "type": "string" }, "default_missing_value": { "default": "SET-ME-PLEASE", "description": "Default missing value placeholder string. Used for consistency across settings.", "examples": [ "SET-ME-PLEASE" ], "title": "Default Missing Value", "type": "string" }, "django_default_file_storage": { "default": "storages.backends.s3boto3.S3Boto3Storage", "description": "The default Django file storage backend.", "examples": [ "storages.backends.s3boto3.S3Boto3Storage", "django.core.files.storage.FileSystemStorage" ], "title": "Django Default File Storage Backend", "type": "string" }, "environment": { "default": "local", "description": "The deployment environment for the platform.", "examples": [ "local", "alpha", "beta", "next", "prod" ], "title": "Deployment Environment", "type": "string" }, "platform_subdomain": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "local", "description": "The subdomain for the platform, used in constructing URLs and email addresses.", "examples": [ "platform", "ubc" ], "title": "Platform Subdomain" }, "root_domain": { "default": "smarter.com", "description": "The root domain for the platform.", "examples": [ "example.com" ], "title": "Root Domain", "type": "string" }, "settings_output": { "default": false, "description": "Flag to enable or disable output of settings for debugging purposes.", "examples": [ true, false ], "title": "Settings Output", "type": "boolean" }, "shared_resource_identifier": { "default": "smarter", "description": "Smarter 1-word identifier to be used when naming any shared resource.", "examples": [ "smarter", "mycompany", "myproject" ], "title": "Shared Resource Identifier", "type": "string" } } }
- Fields:
- Validators:
- pydantic model smarter.common.conf.settings.aws.AwsSettings[source]
The cloud provider: AWS credentials, region, and the EKS cluster.
Show JSON schema
{ "title": "AwsSettings", "description": "The cloud provider: AWS credentials, region, and the EKS cluster.", "type": "object", "properties": { "aws_profile": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "lawrence", "description": "The AWS profile to use for authentication. If present, this will take precedence over AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.", "examples": [ "default", "smarter-profile" ], "title": "AWS Profile" }, "aws_access_key_id": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The AWS access key ID for authentication. Used if AWS_PROFILE is not set. Masked by pydantic SecretStr.", "examples": [ "^AKIA[0-9A-Z]{16}$" ], "title": "AWS Access Key ID" }, "aws_secret_access_key": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The AWS secret access key for authentication. Used if AWS_PROFILE is not set. Masked by pydantic SecretStr.", "examples": [ "^[0-9a-zA-Z/+]{40}$" ], "title": "AWS Secret Access Key" }, "aws_regions": { "default": [ "ap-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-northeast-2", "ap-northeast-1", "il-central-1", "ca-central-1", "sa-east-1", "ca-west-1", "mx-central-1", "ap-southeast-1", "ap-southeast-2", "eu-central-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2" ], "description": "A list of AWS regions considered valid for this platform.", "examples": [ "us-east-1", "us-west-2", "eu-west-1" ], "items": { "type": "string" }, "title": "AWS Regions", "type": "array" }, "aws_region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The single AWS region in which all AWS service clients will operate.", "examples": [ "us-east-1", "us-west-2", "eu-west-1" ], "title": "AWS Region" }, "cloud_provider": { "default": "aws", "description": "The cloud provider of the platform's infrastructure services: DNS, TLS certificates, and the Kubernetes cluster's credentials.", "examples": [ "aws", "memory" ], "title": "Cloud Provider", "type": "string" }, "aws_eks_cluster_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "smarter-ubc-ca-202602121853", "description": "The name of the AWS EKS cluster used for hosting applications.", "examples": [ "apps-hosting-service" ], "title": "AWS EKS Cluster Name" }, "llmhost_node_role_arn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The IAM role of the node groups that Smarter creates for LLMHosts.", "examples": [ "arn:aws:iam::123456789012:role/eks-node-role" ], "title": "LLMHost Node Role ARN" }, "llmhost_node_subnet_ids": { "default": [], "description": "The subnets of the node groups that Smarter creates for LLMHosts.", "examples": [ [ "subnet-0123456789abcdef0" ] ], "items": { "type": "string" }, "title": "LLMHost Node Subnet IDs", "type": "array" } } }
- Fields:
- Validators:
- field aws_access_key_id: SecretStr | None = None
The AWS access key ID for authentication.
Used if AWS_PROFILE is not set. Masked by pydantic SecretStr. This setting provides the access key ID used to authenticate with AWS services. It is used in conjunction with the AWS secret access key to sign requests to AWS APIs.
- Type:
SecretStr
- Default:
Value from
settings_defaults.AWS_ACCESS_KEY_ID- Raises:
SmarterConfigurationError – If the value is not a valid AWS access key ID
The AWS access key ID for authentication. Used if AWS_PROFILE is not set. Masked by pydantic SecretStr.
- Validated by:
- field aws_eks_cluster_name: str | None = 'smarter-ubc-ca-202602121853'
The name of the AWS EKS cluster used for hosting applications.
This setting specifies the Amazon EKS cluster that the platform will use for deploying and managing containerized applications. The cluster name should correspond to an existing EKS cluster in the configured AWS account.
It is optional. Without it, the platform runs, but LLMClients and LLMHosts are not deployed to Kubernetes, and the first attempt to reach the cluster logs how to set it.
- Type:
Optional[str]
- Default:
Value from
settings_defaults.AWS_EKS_CLUSTER_NAME, None if it is not set.- Raises:
SmarterConfigurationError – If the value is not a string.
The name of the AWS EKS cluster used for hosting applications.
- Validated by:
- field aws_profile: str | None = 'lawrence'
The AWS profile to use for authentication.
If present, this will take precedence over AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. This setting specifies which AWS credentials profile to use when connecting to AWS services. Profiles are defined in the AWS credentials file (typically located at ~/.aws/credentials) and allow for managing multiple sets of credentials for different environments or accounts.
- Type:
Optional[str]
- Default:
Value from
settings_defaults.AWS_PROFILE- Raises:
SmarterConfigurationError – If the value is not a string.
The AWS profile to use for authentication. If present, this will take precedence over AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
- Validated by:
- field aws_region: str | None = None
The single AWS region in which all AWS service clients will operate.
This setting specifies the default AWS region for the platform. All AWS service clients will be configured to use this region unless overridden on a per-client basis.
- Type:
- Default:
Value from
settings_defaults.AWS_REGION- Raises:
SmarterConfigurationError – If the value is not a valid AWS region name.
The single AWS region in which all AWS service clients will operate.
- Validated by:
- field aws_regions: List[str] = ['ap-south-1', 'eu-north-1', 'eu-west-3', 'eu-west-2', 'eu-west-1', 'ap-northeast-3', 'ap-northeast-2', 'ap-northeast-1', 'il-central-1', 'ca-central-1', 'sa-east-1', 'ca-west-1', 'mx-central-1', 'ap-southeast-1', 'ap-southeast-2', 'eu-central-1', 'us-east-1', 'us-east-2', 'us-west-1', 'us-west-2']
A list of AWS regions considered valid for this platform.
This setting defines the AWS regions that the platform is configured to operate in. It can be used to restrict operations to specific regions, ensuring that resources are created and managed only in approved locations.
- Type:
List[str]
- Default:
Value from
AWS_REGIONS- Raises:
SmarterConfigurationError – If the value is not a list of valid AWS region names.
A list of AWS regions considered valid for this platform.
- field aws_secret_access_key: SecretStr | None = None
The AWS secret access key for authentication.
Used if AWS_PROFILE is not set. Masked by pydantic SecretStr. This setting provides the secret access key used to authenticate with AWS services. It is used in conjunction with the AWS access key ID to sign requests to AWS APIs.
- Type:
SecretStr
- Default:
Value from
settings_defaults.AWS_SECRET_ACCESS_KEY- Raises:
SmarterConfigurationError – If the value is not a valid AWS secret access key
The AWS secret access key for authentication. Used if AWS_PROFILE is not set. Masked by pydantic SecretStr.
- Validated by:
- field cloud_provider: str = 'aws'
The cloud provider of the platform’s infrastructure services.
The platform reaches DNS, TLS certificates, and its Kubernetes cluster’s credentials only through
smarter.apps.infrastructure.services, which uses this provider.awsis the only cloud that is implemented.memorykeeps everything in memory, for local development without a cloud account.- Type:
- Default:
aws, fromsettings_defaults.CLOUD_PROVIDER- Raises:
SmarterConfigurationError – If the value is not a string.
The cloud provider of the platform’s infrastructure services: DNS, TLS certificates, and the Kubernetes cluster’s credentials.
- Validated by:
- field llmhost_node_role_arn: str | None = None
The IAM role of the EKS managed node groups that Smarter creates for LLMHostCompute.
If it is not set, Smarter uses the node role of the cluster’s first managed node group that it did not create, i.e. the node group that Smarter itself runs on.
- Type:
Optional[str]
- Default:
Value from
settings_defaults.LLMHOST_NODE_ROLE_ARN
The IAM role of the node groups that Smarter creates for LLMHosts.
- field llmhost_node_subnet_ids: List[str] = []
The subnets of the EKS managed node groups that Smarter creates for LLMHostCompute, e.g.
subnet-0123,subnet-0456. An LLMHostCompute’s own subnet_ids take precedence.If it is not set, Smarter uses the subnets of the cluster’s first managed node group that it did not create. A model volume is an EBS volume in one availability zone, so an LLMHost whose retained volume is in one zone cannot be relaunched on a node in another: one subnet per node group avoids this.
- Type:
List[str]
- Default:
Value from
settings_defaults.LLMHOST_NODE_SUBNET_IDS
The subnets of the node groups that Smarter creates for LLMHosts.
- Validated by:
- validator validate_aws_access_key_id » aws_access_key_id[source]
Validates the aws_access_key_id field.
Uses settings_defaults if no value is received.
- validator validate_aws_eks_cluster_name » aws_eks_cluster_name[source]
Validates the aws_eks_cluster_name field.
- validator validate_aws_profile » aws_profile[source]
Validates the aws_profile field.
Uses settings_defaults if no value is received.
- validator validate_aws_region » aws_region[source]
Validates the aws_region field.
Uses settings_defaults if no value is received.
- validator validate_aws_secret_access_key » aws_secret_access_key[source]
Validates the aws_secret_access_key field.
Uses settings_defaults if no value is received.
- validator validate_cloud_provider » cloud_provider[source]
Validates the cloud_provider field.
- validator validate_llmhost_node_subnet_ids » llmhost_node_subnet_ids[source]
Validates the llmhost_node_subnet_ids field: a list, or a comma-separated string.
- pydantic model smarter.common.conf.settings.branding.BrandingSettings[source]
The platform operator’s branding: name, address, contacts, links and logo.
Show JSON schema
{ "title": "BrandingSettings", "description": "The platform operator's branding: name, address, contacts, links and logo.", "type": "object", "properties": { "branding_corporate_name": { "default": "Lawrence P. McDaniel", "description": "The corporate name used for branding purposes throughout the platform.", "examples": [ "Acme Corporation" ], "title": "Branding Corporate Name", "type": "string" }, "branding_support_phone_number": { "default": "+1 (617) 555-6172", "description": "The support phone number used for branding purposes throughout the platform.", "examples": [ "+1-800-555-1234" ], "title": "Branding Support Phone Number", "type": "string" }, "branding_support_email": { "default": "lpm0073@gmail.com", "description": "The support email address used for branding purposes throughout the platform.", "format": "email", "title": "Branding Support Email", "type": "string" }, "branding_address1": { "default": "1015 Chula Vista Ave", "description": "The corporate address used for branding purposes throughout the platform.", "examples": [ "123 Main St, Anytown, USA" ], "title": "Branding Address", "type": "string" }, "branding_address2": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "description": "The second line of the corporate address used for branding purposes throughout the platform.", "examples": [ "Suite 100" ], "title": "Branding Address Line 2" }, "branding_city": { "default": "Burlingame", "description": "The corporate city used for branding purposes throughout the platform.", "examples": [ "Anytown" ], "title": "Branding City", "type": "string" }, "branding_state": { "default": "CA", "description": "The corporate state used for branding purposes throughout the platform.", "examples": [ "CA" ], "title": "Branding State", "type": "string" }, "branding_postal_code": { "default": "94010", "description": "The corporate postal code used for branding purposes throughout the platform.", "examples": [ "12345" ], "title": "Branding Postal Code", "type": "string" }, "branding_country": { "default": "USA", "description": "The corporate country used for branding purposes throughout the platform.", "examples": [ "USA" ], "title": "Branding Country", "type": "string" }, "branding_currency": { "default": "USD", "description": "The currency used for branding purposes throughout the platform.", "examples": [ "USD" ], "title": "Branding Currency", "type": "string" }, "branding_timezone": { "default": "America/San_Francisco", "description": "The timezone used for branding purposes throughout the platform.", "examples": [ "America/New_York" ], "title": "Branding Timezone", "type": "string" }, "branding_contact_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://lawrencemcdaniel.com/contact/", "description": "The contact URL used for branding purposes throughout the platform.", "examples": [ "https://www.example.com/contact" ], "title": "Branding Contact URL" }, "branding_primary_contact": { "default": "Lawrence McDaniel", "description": "The name of the person who is the technical point of contact for this platform.", "examples": [ "Lawrence McDaniel" ], "title": "Branding Primary Contact", "type": "string" }, "branding_support_hours": { "default": "MON-FRI 9:00 AM - 5:00 PM GMT-6 (CST)", "description": "The support hours used for branding purposes throughout the platform.", "examples": [ "Mon-Fri 9am-5pm EST" ], "title": "Branding Support Hours", "type": "string" }, "branding_url_facebook": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://facebook.com/", "description": "The Facebook URL used for branding purposes throughout the platform.", "examples": [ "https://www.facebook.com/example" ], "title": "Branding URL Facebook" }, "branding_url_twitter": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://x.com/fullstackwlarry", "description": "The Twitter URL used for branding purposes throughout the platform.", "examples": [ "https://www.twitter.com/example" ], "title": "Branding URL Twitter" }, "branding_url_linkedin": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://www.linkedin.com/in/lawrencemcdaniel/", "description": "The LinkedIn URL used for branding purposes throughout the platform.", "examples": [ "https://www.linkedin.com/company/example" ], "title": "Branding URL LinkedIn" }, "branding_url_slack": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://join.slack.com/t/thesmarterproject/shared_invite/zt-4f0t6v46q-e2c5Of4hS4fBr_XwfQARCw", "description": "The invite link of the Slack workspace that the platform's emails invite users to.", "examples": [ "https://join.slack.com/t/example/shared_invite/zt-example" ], "title": "Branding URL Slack" }, "logo": { "anyOf": [ { "format": "uri", "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://cdn.smarter.sh/images/logo/smarter-crop.png", "description": "The URL to the platform's logo image.", "examples": [ "https://cdn.example.com/logo.png" ], "title": "Platform Logo URL" }, "marketing_site_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": "https://smarter.sh/", "description": "The URL to the platform's marketing site.", "examples": [ "https://www.example.com" ], "title": "Marketing Site URL" } } }
- Fields:
- Validators:
- field branding_address1: str = '1015 Chula Vista Ave'
The corporate address used for branding purposes throughout the platform.
This setting specifies the physical address of the organization or company that owns or operates the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: str :default: Value from
settings_defaults.BRANDING_ADDRESS1:raises SmarterConfigurationError: If the value is not a string.The corporate address used for branding purposes throughout the platform.
- Validated by:
- field branding_address2: str | None = ''
The second line of the corporate address used for branding purposes throughout the platform.
This setting specifies the second line of the physical address of the organization or company that owns or operates the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: Optional[str] :default: Value from
settings_defaults.BRANDING_ADDRESS2:raises SmarterConfigurationError: If the value is not a string.The second line of the corporate address used for branding purposes throughout the platform.
- Validated by:
- field branding_city: str = 'Burlingame'
The corporate city used for branding purposes throughout the platform.
This setting specifies the city of the physical address of the organization or company that owns or operates the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: str :default: Value from
settings_defaults.BRANDING_CITY:raises SmarterConfigurationError: If the value is not a string.The corporate city used for branding purposes throughout the platform.
- Validated by:
- field branding_contact_url: HttpUrl | None = HttpUrl('https://lawrencemcdaniel.com/contact/')
The contact URL used for branding purposes throughout the platform.
This setting specifies the URL that users can visit to contact the organization or company that owns or operates the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: str :default: Value from
settings_defaults.BRANDING_CONTACT_URL:raises SmarterConfigurationError: If the value is not a string.The contact URL used for branding purposes throughout the platform.
- Validated by:
- field branding_corporate_name: str = 'Lawrence P. McDaniel'
The corporate name used for branding purposes throughout the platform.
This setting specifies the name of the organization or company that owns or operates the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: str :default: Value from
settings_defaults.BRANDING_CORPORATE_NAME:raises SmarterConfigurationError: If the value is not a string.The corporate name used for branding purposes throughout the platform.
- Validated by:
- field branding_country: str = 'USA'
The corporate country used for branding purposes throughout the platform.
This setting specifies the country of the physical address of the organization or company that owns or operates the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: str :default: Value from
settings_defaults.BRANDING_COUNTRY:raises SmarterConfigurationError: If the value is not a string.The corporate country used for branding purposes throughout the platform.
- Validated by:
- field branding_currency: str = 'USD'
The currency used for branding purposes throughout the platform.
This setting specifies the currency that is used in various branding contexts, such as email templates, user interfaces, and documentation. It can be used to indicate the currency in which prices, billing, or financial information is presented to users. :type: str :default: Value from
settings_defaults.BRANDING_CURRENCY:raises SmarterConfigurationError: If the value is not a string.The currency used for branding purposes throughout the platform.
- Validated by:
- field branding_postal_code: str = '94010'
The corporate postal code used for branding purposes throughout the platform.
This setting specifies the postal code of the physical address of the organization or company that owns or operates the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: str :default: Value from
settings_defaults.BRANDING_POSTAL_CODE:raises SmarterConfigurationError: If the value is not a string.The corporate postal code used for branding purposes throughout the platform.
- Validated by:
- field branding_primary_contact: str = 'Lawrence McDaniel'
The name of the person who is the technical point of contact for this platform.
This setting names the person who hosts the platform and answers its users’ questions. The welcome email is written from this person, and signed with this name. :type: str :default: Value from
settings_defaults.BRANDING_PRIMARY_CONTACT:raises SmarterConfigurationError: If the value is not a string.The name of the person who is the technical point of contact for this platform.
- Validated by:
- field branding_state: str = 'CA'
The corporate state used for branding purposes throughout the platform.
This setting specifies the state of the physical address of the organization or company that owns or operates the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: str :default: Value from
settings_defaults.BRANDING_STATE:raises SmarterConfigurationError: If the value is not a string.The corporate state used for branding purposes throughout the platform.
- Validated by:
- field branding_support_email: EmailStr = 'lpm0073@gmail.com'
The support email address used for branding purposes throughout the platform.
This setting specifies the email address that users can contact for support or assistance related to the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: EmailStr :default: Value from
settings_defaults.BRANDING_SUPPORT_EMAIL:raises SmarterConfigurationError: If the value is not a EmailStr.The support email address used for branding purposes throughout the platform.
- Validated by:
- field branding_support_hours: str = 'MON-FRI 9:00 AM - 5:00 PM GMT-6 (CST)'
The support hours used for branding purposes throughout the platform.
This setting specifies the hours during which support is available for users of the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: str :default: Value from
settings_defaults.BRANDING_SUPPORT_HOURS:raises SmarterConfigurationError: If the value is not a string.The support hours used for branding purposes throughout the platform.
- Validated by:
- field branding_support_phone_number: str = '+1 (617) 555-6172'
The support phone number used for branding purposes throughout the platform.
This setting specifies the phone number that users can call for support or assistance related to the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: str :default: Value from
settings_defaults.BRANDING_SUPPORT_PHONE_NUMBER:raises SmarterConfigurationError: If the value is not a string.The support phone number used for branding purposes throughout the platform.
- Validated by:
- field branding_timezone: str = 'America/San_Francisco'
The timezone used for branding purposes throughout the platform.
This setting specifies the timezone that is used in various branding contexts, such as email templates, user interfaces, and documentation. It can be used to indicate the timezone in which dates and times are presented to users. :type: str :default: Value from
settings_defaults.BRANDING_TIMEZONE:raises SmarterConfigurationError: If the value is not a string.The timezone used for branding purposes throughout the platform.
- Validated by:
- field branding_url_facebook: HttpUrl | None = HttpUrl('https://facebook.com/')
The Facebook URL used for branding purposes throughout the platform.
This setting specifies the Facebook page URL of the organization or company that owns or operates the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: Optional[HttpUrl] :default: Value from
settings_defaults.BRANDING_URL_FACEBOOK:raises SmarterConfigurationError: If the value is not a valid HttpUrl.The Facebook URL used for branding purposes throughout the platform.
- Validated by:
- field branding_url_linkedin: HttpUrl | None = HttpUrl('https://www.linkedin.com/in/lawrencemcdaniel/')
The LinkedIn URL used for branding purposes throughout the platform.
This setting specifies the LinkedIn profile URL of the organization or company that owns or operates the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: Optional[HttpUrl] :default: Value from
settings_defaults.BRANDING_URL_LINKEDIN:raises SmarterConfigurationError: If the value is not a valid HttpUrl.The LinkedIn URL used for branding purposes throughout the platform.
- Validated by:
- field branding_url_slack: HttpUrl | None = HttpUrl('https://join.slack.com/t/thesmarterproject/shared_invite/zt-4f0t6v46q-e2c5Of4hS4fBr_XwfQARCw')
The invite link of the Slack workspace that the platform’s emails invite users to.
The welcome email links to it, and the Slack invitation email, which a Celery Beat task sends two days after the welcome email, is about it. The default is the invite link of The Smarter Project’s Slack workspace.
- Type:
Optional[HttpUrl]
- Default:
Value from
settings_defaults.BRANDING_URL_SLACK- Raises:
SmarterConfigurationError – If the value is not a valid HttpUrl.
The invite link of the Slack workspace that the platform’s emails invite users to.
- Validated by:
- field branding_url_twitter: HttpUrl | None = HttpUrl('https://x.com/fullstackwlarry')
The Twitter URL used for branding purposes throughout the platform.
This setting specifies the Twitter profile URL of the organization or company that owns or operates the platform. It is used in various branding contexts, such as email templates, user interfaces, and documentation. :type: Optional[HttpUrl] :default: Value from
settings_defaults.BRANDING_URL_TWITTER:raises SmarterConfigurationError: If the value is not a valid HttpUrl.The Twitter URL used for branding purposes throughout the platform.
- Validated by:
- field logo: AnyUrl | None = AnyUrl('https://cdn.smarter.sh/images/logo/smarter-crop.png')
The URL to the platform’s logo image.
This setting specifies the web address of the logo image used in the platform’s user interface. It should be a valid URL pointing to an external image resource accessible by the frontend.
- Type:
Optional[AnyUrl]
- Default:
Value from
settings_defaults.LOGO- Raises:
SmarterConfigurationError – If the value is not a valid URL string.
The URL to the platform’s logo image.
- Validated by:
- field marketing_site_url: HttpUrl | None = HttpUrl('https://smarter.sh/')
The URL to the platform’s marketing site.
This setting specifies the web address of the marketing site associated with the platform. It should be a valid URL pointing to an external website.
- Type:
Optional[httpHttpUrl]
- Default:
Value from
settings_defaults.MARKETING_SITE_URL- Raises:
SmarterConfigurationError – If the value is not a valid URL string.
The URL to the platform’s marketing site.
- Validated by:
- validator validate_branding_address » branding_address1[source]
Validates the branding_address1 field.
- validator validate_branding_address2 » branding_address2[source]
Validates the branding_address2 field.
- validator validate_branding_city » branding_city[source]
Validates the branding_city field.
- validator validate_branding_contact_url » branding_contact_url[source]
Validates the branding_contact_url field.
- validator validate_branding_corporate_name » branding_corporate_name[source]
Validates the branding_corporate_name field.
- validator validate_branding_country » branding_country[source]
Validates the branding_country field.
- validator validate_branding_currency » branding_currency[source]
Validates the branding_currency field.
- validator validate_branding_postal_code » branding_postal_code[source]
Validates the branding_postal_code field.
- validator validate_branding_primary_contact » branding_primary_contact[source]
Validates the branding_primary_contact field.
- validator validate_branding_state » branding_state[source]
Validates the branding_state field.
- validator validate_branding_support_email » branding_support_email[source]
Validates the branding_support_email field.
- Parameters:
v (
EmailStr|None) – The branding support email value to validate.- Returns:
The validated branding support email.
- Return type:
EmailStr
- validator validate_branding_support_hours » branding_support_hours[source]
Validates the branding_support_hours field.
- validator validate_branding_support_phone_number » branding_support_phone_number[source]
Validates the branding_support_phone_number field.
- validator validate_branding_timezone » branding_timezone[source]
Validates the branding_timezone field.
- validator validate_branding_url_facebook » branding_url_facebook[source]
Validates the branding_url_facebook field.
- validator validate_branding_url_linkedin » branding_url_linkedin[source]
Validates the branding_url_linkedin field.
- validator validate_branding_url_slack » branding_url_slack[source]
Validates the branding_url_slack field.
- validator validate_branding_url_twitter » branding_url_twitter[source]
Validates the branding_url_twitter field.
- validator validate_logo » logo[source]
Validates the logo field.
- Parameters:
v (
AnyUrl|None) – The logo value to validate.- Returns:
The validated logo.
- Return type:
AnyUrl
- validator validate_marketing_site_url » marketing_site_url[source]
Validates the marketing_site_url field.
- Parameters:
v (
HttpUrl|None) – The marketing site URL value to validate.- Returns:
The validated marketing site URL.
- Return type:
HttpUrl
- pydantic model smarter.common.conf.settings.cache.CacheSettings[source]
How long cached views, prompts, llmclients and responses are kept.
Show JSON schema
{ "title": "CacheSettings", "description": "How long cached views, prompts, llmclients and responses are kept.", "type": "object", "properties": { "cache_expiration": { "default": 60, "description": "The cache expiration time in seconds for cached data.", "exclusiveMinimum": 0, "title": "Cache Expiration", "type": "integer" }, "chat_cache_expiration": { "default": 5, "description": "The prompt cache expiration time in seconds for cached prompt data.", "exclusiveMinimum": 0, "title": "Prompt Cache Expiration", "type": "integer" }, "prompt_response_cache_expiration": { "default": 3600, "description": "Seconds to cache the LLM's answer to the first message of a conversation. 0 disables the cache.", "minimum": 0, "title": "Prompt Response Cache Expiration", "type": "integer" }, "listview_cache_expiration": { "default": 3600, "description": "The cache expiration time in seconds for the pages of the web console's list views.", "exclusiveMinimum": 0, "title": "List View Cache Expiration", "type": "integer" }, "llmclient_cache_expiration": { "default": 300, "description": "The llmclient cache expiration time in seconds for cached llmclient data.", "exclusiveMinimum": 0, "title": "LLMClient Cache Expiration", "type": "integer" } } }
- Fields:
- Validators:
- field cache_expiration: int = 60
Default cache expiration time for Django views that use page caching.
See: django.views.decorators.cache.cache_control and django.views.decorators.cache.cache_page
The cache expiration time in seconds for cached data. This setting defines how long cached data should be considered valid before it is refreshed or invalidated. A shorter expiration time may lead to more frequent cache refreshes, while a longer expiration time can improve performance by reducing the number of cache lookups. :type: int :default: Value from
settings_defaults.CACHE_EXPIRATION:raises SmarterConfigurationError: If the value is not a positive integer.The cache expiration time in seconds for cached data.
- Constraints:
gt = 0
- Validated by:
- field chat_cache_expiration: int = 5
The prompt cache expiration time in seconds for cached prompt data.
This setting defines how long cached prompt data should be considered valid before it is refreshed or invalidated. A shorter expiration time may lead to more frequent cache refreshes, while a longer expiration time can improve performance by reducing the number of cache lookups.
- Type:
- Default:
Value from
settings_defaults.CHAT_CACHE_EXPIRATION- Raises:
SmarterConfigurationError – If the value is not a positive integer.
see:
smarter.apps.prompt.models.PromptHelperThe prompt cache expiration time in seconds for cached prompt data.
- Constraints:
gt = 0
- Validated by:
- field listview_cache_expiration: int = 3600
The cache expiration time in seconds for the pages of the web console’s list views.
Each list api caches the pages that it returns, per user. Saving or deleting a resource makes its list’s cached pages stale at once (see
smarter.lib.django.listview), so this expiration only bounds how long a change made without Django’s signals, such as aQuerySet.update(), can go unnoticed.- Type:
- Default:
Value from
settings_defaults.LISTVIEW_CACHE_EXPIRATION- Raises:
SmarterConfigurationError – If the value is not a positive integer.
The cache expiration time in seconds for the pages of the web console’s list views.
- Constraints:
gt = 0
- Validated by:
- field llmclient_cache_expiration: int = 300
The llmclient cache expiration time in seconds for cached llmclient data.
This setting defines how long cached llmclient data should be considered valid before it is refreshed or invalidated. A shorter expiration time may lead to more frequent cache refreshes, while a longer expiration time can improve performance by reducing the number of cache lookups.
- Type:
- Default:
Value from
settings_defaults.LLM_CLIENT_CACHE_EXPIRATION- Raises:
SmarterConfigurationError – If the value is not a positive integer.
The llmclient cache expiration time in seconds for cached llmclient data.
- Constraints:
gt = 0
- Validated by:
- field prompt_response_cache_expiration: int = 3600
Seconds to cache the LLM’s answer to the first message of a conversation.
0 disables the cache.
A first message has no conversation before it, so the same message, sent to the same LLMClient, gets the same answer, e.g. one of the LLMClient’s
appExamplePrompts. Later messages are never cached, because their answers depend on the conversation. Seesmarter.apps.provider.services.text_completion.lib.prompt_cache.- Type:
- Default:
Value from
settings_defaults.PROMPT_RESPONSE_CACHE_EXPIRATION, one hour- Raises:
SmarterConfigurationError – If the value is not a non-negative integer.
Seconds to cache the LLM’s answer to the first message of a conversation. 0 disables the cache.
- Constraints:
ge = 0
- Validated by:
- validator parse_cache_expiration » cache_expiration[source]
Validates the ‘cache_expiration’ field.
- validator parse_chat_cache_expiration » chat_cache_expiration[source]
Validates the ‘chat_cache_expiration’ field.
- validator parse_listview_cache_expiration » listview_cache_expiration[source]
Validates the ‘listview_cache_expiration’ field.
- validator parse_llmclient_cache_expiration » llmclient_cache_expiration[source]
Validates the ‘llmclient_cache_expiration’ field.
- validator parse_prompt_response_cache_expiration » prompt_response_cache_expiration[source]
Validates the ‘prompt_response_cache_expiration’ field.
- pydantic model smarter.common.conf.settings.database.DatabaseSettings[source]
The platform’s MySQL (MariaDB) database.
Show JSON schema
{ "title": "DatabaseSettings", "description": "The platform's MySQL (MariaDB) database.", "type": "object", "properties": { "mysql_root_username": { "default": "root", "description": "The database server's administrator, whom manage.py load_from_github --run_scripts passes to a repository's scripts.", "examples": [ "root" ], "title": "MySQL Root Username", "type": "string" }, "mysql_root_password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The password of the database server's administrator, mysql_root_username.", "examples": [ "your-root-password" ], "title": "MySQL Root Password" }, "mysql_host": { "default": "smarter-mariadb", "description": "The host name of the platform's database server.", "examples": [ "smarter-mariadb", "mysql.example.com" ], "title": "MySQL Host", "type": "string" }, "mysql_port": { "default": 3306, "description": "The TCP port of the platform's database server.", "examples": [ 3306 ], "maximum": 65535, "minimum": 1, "title": "MySQL Port", "type": "integer" }, "mysql_database": { "default": "smarter", "description": "The name of the platform's database.", "examples": [ "smarter" ], "title": "MySQL Database", "type": "string" }, "mysql_user": { "default": "smarter", "description": "The database user that the platform connects as.", "examples": [ "smarter" ], "title": "MySQL User", "type": "string" }, "mysql_password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The password of mysql_user, the database user that the platform connects as.", "examples": [ "your-database-password" ], "title": "MySQL Password" }, "database_read_timeout": { "default": 0, "description": "The seconds that a query of the platform's database may wait for the server's reply before it fails. 0 for no timeout.", "minimum": 0, "title": "Database Read Timeout", "type": "integer" } } }
- Fields:
- Validators:
- field database_read_timeout: int = 0
The seconds that a query of the platform’s database may wait for the server’s reply, and a write may.
wait to be sent, before it fails. 0, the default, is no timeout.
Without a timeout, a request whose query the database never answers holds its thread forever. The Helm chart sets it for the web server’s pods only: migrations and other management commands can legitimately run longer, and keep the default. Connecting always times out after
smarter.settings.base.DATABASE_CONNECT_TIMEOUTseconds.Set it with
SMARTER_DATABASE_READ_TIMEOUT.- Type:
- Default:
Value from
settings_defaults.DATABASE_READ_TIMEOUT, 0 if it is not set.- Raises:
SmarterConfigurationError – If the value is not a non-negative integer.
The seconds that a query of the platform’s database may wait for the server’s reply before it fails. 0 for no timeout.
- Constraints:
ge = 0
- Validated by:
- field mysql_database: str = 'smarter'
The name of the platform’s database, Django’s
DATABASES["default"]["NAME"].Set it with
SMARTER_MYSQL_DATABASE.- Type:
- Default:
Value from
settings_defaults.MYSQL_DATABASE,smarterif it is not set.- Raises:
SmarterConfigurationError – If the value is not a non-empty string.
The name of the platform’s database.
- Validated by:
- field mysql_host: str = 'smarter-mariadb'
The host name of the platform’s database server, Django’s
DATABASES["default"]["HOST"].Set it with
SMARTER_MYSQL_HOST.- Type:
- Default:
Value from
settings_defaults.MYSQL_HOST,smarter-mariadb, the local docker-compose service, if it is not set.- Raises:
SmarterConfigurationError – If the value is not a non-empty string.
The host name of the platform’s database server.
- Validated by:
- field mysql_password: SecretStr | None = SecretStr('**********')
The password of
mysql_user, Django’sDATABASES["default"]["PASSWORD"].Set it with
SMARTER_MYSQL_PASSWORD. In the local environment it defaults to the password of docker-compose.yml’s smarter-mariadb service. Elsewhere there is no default: a missing password, or a placeholder such asSET-ME-PLEASE, is None, and the platform can’t connect to its database.- Type:
Optional[SecretStr]
- Default:
Value from
settings_defaults.MYSQL_PASSWORD.- Raises:
SmarterConfigurationError – If the value is not a SecretStr.
The password of mysql_user, the database user that the platform connects as.
- Validated by:
- field mysql_port: int = 3306
The TCP port of the platform’s database server, Django’s
DATABASES["default"]["PORT"].Set it with
SMARTER_MYSQL_PORT.- Type:
- Default:
Value from
settings_defaults.MYSQL_PORT, 3306 if it is not set.- Raises:
SmarterConfigurationError – If the value is not a port number, 1 to 65535.
The TCP port of the platform’s database server.
- Constraints:
ge = 1
le = 65535
- Validated by:
- field mysql_root_password: SecretStr | None = None
The password of the database server’s administrator,
mysql_root_username.Set it with
SMARTER_MYSQL_ROOT_PASSWORD.manage.py load_from_github --run_scriptspasses it to a repository’s scripts in theMYSQL_PWDenvironment variable, where the MariaDB and MySQL clients read it, which keeps it off the command line. Without it, the scripts don’t receive it.- Type:
Optional[SecretStr]
- Default:
Value from
settings_defaults.MYSQL_ROOT_PASSWORD, None if it is not set.- Raises:
SmarterConfigurationError – If the value is not a SecretStr.
The password of the database server’s administrator, mysql_root_username.
- Validated by:
- field mysql_root_username: str = 'root'
The database server’s administrator.
manage.py load_from_github --run_scriptspasses it to a repository’s scripts, inSMARTER_DATABASE_ADMIN_USERNAME, e.g. to the Stackademy script that creates its course database and its users, so it needs a user that may. Set it withSMARTER_MYSQL_ROOT_USERNAME.- Type:
- Default:
Value from
settings_defaults.MYSQL_ROOT_USERNAME,rootif it is not set.- Raises:
SmarterConfigurationError – If the value is not a non-empty string.
The database server’s administrator, whom manage.py load_from_github –run_scripts passes to a repository’s scripts.
- Validated by:
- field mysql_user: str = 'smarter'
The database user that the platform connects as, Django’s
DATABASES["default"]["USER"].Set it with
SMARTER_MYSQL_USER.- Type:
- Default:
Value from
settings_defaults.MYSQL_USER,smarterif it is not set.- Raises:
SmarterConfigurationError – If the value is not a non-empty string.
The database user that the platform connects as.
- Validated by:
- validator parse_database_read_timeout » database_read_timeout[source]
Validates the ‘database_read_timeout’ field.
- validator validate_mysql_database » mysql_database[source]
Validates the mysql_database field.
- validator validate_mysql_host » mysql_host[source]
Validates the mysql_host field.
- validator validate_mysql_password » mysql_password[source]
Validates the mysql_password field.
- validator validate_mysql_port » mysql_port[source]
Validates the mysql_port field.
- validator validate_mysql_root_password » mysql_root_password[source]
Validates the mysql_root_password field.
- validator validate_mysql_root_username » mysql_root_username[source]
Validates the mysql_root_username field.
- pydantic model smarter.common.conf.settings.email.EmailSettings[source]
Outgoing email: SMTP, the administrator’s address, and the mailing list.
Show JSON schema
{ "title": "EmailSettings", "description": "Outgoing email: SMTP, the administrator's address, and the mailing list.", "type": "object", "properties": { "init_info": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Init Info" }, "loki_url": { "default": "", "description": "The base url of the Loki that stores the platform's pod logs, e.g. http://smarter-loki:3100. Empty: there is none.", "examples": [ "http://smarter-loki:3100" ], "title": "Loki URL", "type": "string" }, "default_missing_value": { "default": "SET-ME-PLEASE", "description": "Default missing value placeholder string. Used for consistency across settings.", "examples": [ "SET-ME-PLEASE" ], "title": "Default Missing Value", "type": "string" }, "django_default_file_storage": { "default": "storages.backends.s3boto3.S3Boto3Storage", "description": "The default Django file storage backend.", "examples": [ "storages.backends.s3boto3.S3Boto3Storage", "django.core.files.storage.FileSystemStorage" ], "title": "Django Default File Storage Backend", "type": "string" }, "environment": { "default": "local", "description": "The deployment environment for the platform.", "examples": [ "local", "alpha", "beta", "next", "prod" ], "title": "Deployment Environment", "type": "string" }, "platform_subdomain": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "local", "description": "The subdomain for the platform, used in constructing URLs and email addresses.", "examples": [ "platform", "ubc" ], "title": "Platform Subdomain" }, "root_domain": { "default": "smarter.com", "description": "The root domain for the platform.", "examples": [ "example.com" ], "title": "Root Domain", "type": "string" }, "settings_output": { "default": false, "description": "Flag to enable or disable output of settings for debugging purposes.", "examples": [ true, false ], "title": "Settings Output", "type": "boolean" }, "shared_resource_identifier": { "default": "smarter", "description": "Smarter 1-word identifier to be used when naming any shared resource.", "examples": [ "smarter", "mycompany", "myproject" ], "title": "Shared Resource Identifier", "type": "string" }, "aws_profile": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "lawrence", "description": "The AWS profile to use for authentication. If present, this will take precedence over AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.", "examples": [ "default", "smarter-profile" ], "title": "AWS Profile" }, "aws_access_key_id": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The AWS access key ID for authentication. Used if AWS_PROFILE is not set. Masked by pydantic SecretStr.", "examples": [ "^AKIA[0-9A-Z]{16}$" ], "title": "AWS Access Key ID" }, "aws_secret_access_key": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The AWS secret access key for authentication. Used if AWS_PROFILE is not set. Masked by pydantic SecretStr.", "examples": [ "^[0-9a-zA-Z/+]{40}$" ], "title": "AWS Secret Access Key" }, "aws_regions": { "default": [ "ap-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-northeast-2", "ap-northeast-1", "il-central-1", "ca-central-1", "sa-east-1", "ca-west-1", "mx-central-1", "ap-southeast-1", "ap-southeast-2", "eu-central-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2" ], "description": "A list of AWS regions considered valid for this platform.", "examples": [ "us-east-1", "us-west-2", "eu-west-1" ], "items": { "type": "string" }, "title": "AWS Regions", "type": "array" }, "aws_region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The single AWS region in which all AWS service clients will operate.", "examples": [ "us-east-1", "us-west-2", "eu-west-1" ], "title": "AWS Region" }, "cloud_provider": { "default": "aws", "description": "The cloud provider of the platform's infrastructure services: DNS, TLS certificates, and the Kubernetes cluster's credentials.", "examples": [ "aws", "memory" ], "title": "Cloud Provider", "type": "string" }, "aws_eks_cluster_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "smarter-ubc-ca-202602121853", "description": "The name of the AWS EKS cluster used for hosting applications.", "examples": [ "apps-hosting-service" ], "title": "AWS EKS Cluster Name" }, "llmhost_node_role_arn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The IAM role of the node groups that Smarter creates for LLMHosts.", "examples": [ "arn:aws:iam::123456789012:role/eks-node-role" ], "title": "LLMHost Node Role ARN" }, "llmhost_node_subnet_ids": { "default": [], "description": "The subnets of the node groups that Smarter creates for LLMHosts.", "examples": [ [ "subnet-0123456789abcdef0" ] ], "items": { "type": "string" }, "title": "LLMHost Node Subnet IDs", "type": "array" }, "email_admin": { "default": "lpm0073@gmail.com", "description": "The administrator email address used for system notifications and alerts.", "examples": [ "admin@example.com" ], "format": "email", "title": "Administrator Email Address", "type": "string" }, "mailchimp_api_key": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The API key for Mailchimp services. Masked by pydantic SecretStr.", "examples": [ "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ], "title": "Mailchimp API Key" }, "mailchimp_list_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "272208fe44", "description": "The Mailchimp list ID for managing email subscribers.", "examples": [ "a1b2c3d4e5" ], "title": "Mailchimp List ID" }, "smtp_sender": { "anyOf": [ { "format": "email", "type": "string" }, { "type": "null" } ], "default": "no-reply@smarter.sh", "description": "The sender email address for SMTP emails.", "examples": [ "sender@example.com" ], "title": "SMTP Sender Email Address" }, "smtp_password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The SMTP password for authentication. Assumed to be an AWS SES-generated IAM keypair secret.", "examples": [ "your-smtp-password" ], "title": "SMTP Password" }, "smtp_port": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 587, "description": "The SMTP port for sending emails.", "examples": [ 25, 465, 587 ], "title": "SMTP Port Number" }, "smtp_use_ssl": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether to use SSL for SMTP connections.", "examples": [ true, false ], "title": "SMTP Use SSL" }, "smtp_use_tls": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Whether to use TLS for SMTP connections.", "examples": [ true, false ], "title": "SMTP Use TLS" }, "smtp_username": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The SMTP username for authentication. Assumed to be an AWS SES-generatred IAM keypair username.", "examples": [ "your-smtp-username" ], "title": "SMTP Username" } } }
- Fields:
- Validators:
- field email_admin: EmailStr = 'lpm0073@gmail.com'
The administrator email address used for system notifications and alerts.
This email address is used as the primary contact for system notifications, alerts, and other administrative communications related to the platform.
- Type:
- Default:
Value from
settings_defaults.EMAIL_ADMIN- Raises:
SmarterConfigurationError – If the value is not a valid email address.
The administrator email address used for system notifications and alerts.
- Validated by:
- field mailchimp_api_key: SecretStr | None = SecretStr('**********')
The API key for Mailchimp services.
Masked by pydantic SecretStr. This setting provides the API key used to authenticate with Mailchimp services. It is required for accessing Mailchimp’s APIs and services.
- Type:
Optional[SecretStr]
- Default:
Value from
settings_defaults.MAILCHIMP_API_KEY- Raises:
SmarterConfigurationError – If the value is not a valid API key.
The API key for Mailchimp services. Masked by pydantic SecretStr.
- Validated by:
- field mailchimp_list_id: str | None = '272208fe44'
The Mailchimp list ID for managing email subscribers.
This setting specifies the unique identifier of the Mailchimp list used for managing email subscribers. It is required for adding, removing, and managing subscribers within Mailchimp.
- Type:
Optional[str]
- Default:
Value from
settings_defaults.MAILCHIMP_LIST_ID- Raises:
SmarterConfigurationError – If the value is not a string.
The Mailchimp list ID for managing email subscribers.
- Validated by:
- field smtp_password: SecretStr | None = SecretStr('**********')
The SMTP password for authentication.
This setting provides the password used to authenticate with the SMTP server. It is required for sending emails through the SMTP server, which is optional.
- Type:
Optional[SecretStr]
- Default:
Value from
settings_defaults.SMTP_PASSWORD, None if it is not set.- Raises:
SmarterConfigurationError – If the value is not a valid password.
The SMTP password for authentication. Assumed to be an AWS SES-generated IAM keypair secret.
- Validated by:
- field smtp_port: int | None = 587
The SMTP port for sending emails.
This setting specifies the port number used to connect to the SMTP server for sending outgoing emails.
- Type:
Optional[int]
- Default:
Value from
settings_defaults.SMTP_PORT- Raises:
SmarterConfigurationError – If the value is not a valid port number.
The SMTP port for sending emails.
- Validated by:
- field smtp_sender: EmailStr | None = 'no-reply@smarter.sh'
The sender email address for SMTP emails.
This setting specifies the email address that will appear as the sender in outgoing SMTP emails sent by the platform.
- Type:
Optional[EmailStr]
- Default:
Value from
settings_defaults.SMTP_SENDER- Raises:
SmarterConfigurationError – If the value is not a valid email address.
The sender email address for SMTP emails.
- Validated by:
- field smtp_use_ssl: bool | None = False
Whether to use SSL for SMTP connections.
This setting indicates whether SSL (Secure Sockets Layer) should be used when connecting to the SMTP server for sending emails.
- Type:
Optional[bool]
- Default:
Value from
settings_defaults.SMTP_USE_SSL- Raises:
SmarterConfigurationError – If the value is not a boolean.
Whether to use SSL for SMTP connections.
- Validated by:
- field smtp_use_tls: bool | None = True
Whether to use TLS for SMTP connections.
This setting indicates whether TLS (Transport Layer Security) should be used when connecting to the SMTP server for sending emails.
- Type:
Optional[bool]
- Default:
Value from
settings_defaults.SMTP_USE_TLS- Raises:
SmarterConfigurationError – If the value is not a boolean.
Whether to use TLS for SMTP connections.
- Validated by:
- field smtp_username: SecretStr | None = SecretStr('**********')
The SMTP username for authentication.
This setting provides the username used to authenticate with the SMTP server. It is required for sending emails through the SMTP server, which is optional.
- Type:
Optional[SecretStr]
- Default:
Value from
settings_defaults.SMTP_USERNAME, None if it is not set.- Raises:
SmarterConfigurationError – If the value is not a string.
The SMTP username for authentication. Assumed to be an AWS SES-generatred IAM keypair username.
- Validated by:
- validator validate_email_admin » email_admin[source]
Validates the email_admin field.
- Parameters:
v (
EmailStr|None) – The administrator email address value to validate.- Returns:
The validated administrator email address.
- Return type:
EmailStr
- validator validate_mailchimp_api_key » mailchimp_api_key[source]
Validates the mailchimp_api_key field.
- Parameters:
v (
SecretStr|None) – The Mailchimp API key value to validate.- Returns:
The validated Mailchimp API key.
- Return type:
SecretStr
- validator validate_mailchimp_list_id » mailchimp_list_id[source]
Validates the mailchimp_list_id field.
- validator validate_smtp_password » smtp_password[source]
Validates the smtp_password field.
- validator validate_smtp_sender » smtp_sender[source]
Validates the smtp_sender field.
- validator validate_smtp_use_ssl » smtp_use_ssl[source]
Validates the smtp_use_ssl field.
- validator validate_smtp_use_tls » smtp_use_tls[source]
Validates the smtp_use_tls field.
- validator validate_smtp_username » smtp_username[source]
Validates the smtp_username field.
- pydantic model smarter.common.conf.settings.features.FeatureSettings[source]
Feature flags, debugging and logging.
Show JSON schema
{ "title": "FeatureSettings", "description": "Feature flags, debugging and logging.", "type": "object", "properties": { "debug_mode": { "default": true, "description": "True if debug mode is enabled. This enables verbose logging and other debug features.", "title": "Debug Mode", "type": "boolean" }, "dump_defaults": { "default": false, "description": "True if default values should be dumped for debugging purposes.", "title": "Dump Defaults", "type": "boolean" }, "developer_mode": { "default": true, "description": "True if developer mode is enabled. Used as a means to configure a production Docker container to run locally for student use.", "title": "Developer Mode", "type": "boolean" }, "enable_dropzone_manifest_apply": { "default": true, "description": "True if the file drop zone feature is enabled based on the current environment.", "title": "Enable File Drop Zone", "type": "boolean" }, "enable_vectorstore": { "default": true, "description": "True if the vectorstore feature is enabled based on the current environment.", "title": "Enable Vectorstore", "type": "boolean" }, "enable_proxy": { "default": true, "description": "True if the proxy feature is enabled based on the current environment.", "title": "Enable Proxy", "type": "boolean" }, "enable_dashboard_server_logs": { "default": true, "description": "True if the terminal app feature is enabled based on the current environment.", "title": "Enabled Terminal App", "type": "boolean" }, "enable_web_console_terminal": { "default": true, "description": "True if superusers can open a bash shell inside the server's container from the web console's Terminal page. Off by default.", "title": "Enable Web Console Terminal", "type": "boolean" }, "static_files_on_cdn": { "default": false, "description": "True if the platform's static files, the web console's scripts among them, are uploaded to the environment's S3 bucket and served from its CDN. Off by default: the server serves them.", "title": "Static Files on the CDN", "type": "boolean" }, "enable_dashboard_passthrough_prompt": { "default": true, "description": "True if the passthrough prompt feature is enabled based on the current environment.", "title": "Enable Passthrough Prompt", "type": "boolean" }, "log_level": { "default": 10, "description": "The logging level for the platform based on Python logging levels: logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL", "examples": [ 10, 20, 30, 40, 50 ], "maximum": 50, "minimum": 0, "title": "Logging Level", "type": "integer" }, "verbose_logging": { "default": true, "description": "Whether to enable verbose logging for debugging purposes.", "examples": [ true, false ], "title": "Verbose Logging", "type": "boolean" } } }
- Fields:
- Validators:
- field debug_mode: bool = True
True if debug mode is enabled.
This enables verbose logging and other debug features.
When debug mode is enabled, the platform will log additional information useful for troubles hooting and development. This may include detailed error messages, stack traces, and other diagnostic data that can help identify issues during development or testing.
- Type:
- Default:
Value from
settings_defaults.DEBUG_MODE- Raises:
SmarterConfigurationError – If the value is not a boolean.
True if debug mode is enabled. This enables verbose logging and other debug features.
- Validated by:
- field developer_mode: bool = True
True if developer mode is enabled.
Used as a means to configure a production Docker container to run locally for student use. When developer mode is enabled, certain restrictions or configurations that are typical of a production environment may be relaxed or altered to facilitate local development and testing. This allows developers to work with a production-like setup without the constraints that would normally apply in a live environment.
- Type:
- Default:
Value from
settings_defaults.DEVELOPER_MODE- Raises:
SmarterConfigurationError – If the value is not a boolean.
True if developer mode is enabled. Used as a means to configure a production Docker container to run locally for student use.
- Validated by:
- field dump_defaults: bool = False
True if default values should be dumped for debugging purposes.
When enabled, the platform will log or output the default configuration values used during initialization. This can help developers and administrators understand the effective configuration of the system, especially when trouble shooting issues related to settings.
- Type:
- Default:
Value from
settings_defaults.DUMP_DEFAULTS- Raises:
SmarterConfigurationError – If the value is not a boolean.
True if default values should be dumped for debugging purposes.
- Validated by:
- field enable_dashboard_passthrough_prompt: bool = True
Determines if the passthrough prompt feature is enabled based on the current environment.
- Returns:
True if the passthrough prompt is enabled, False otherwise.
- Return type:
True if the passthrough prompt feature is enabled based on the current environment.
- Validated by:
- field enable_dashboard_server_logs: bool = True
Determines if the terminal app feature is enabled based on the current environment.
- Returns:
True if the terminal app is enabled, False otherwise.
- Return type:
True if the terminal app feature is enabled based on the current environment.
- Validated by:
- field enable_dropzone_manifest_apply: bool = True
Determines if the file drop zone feature is enabled based on the current environment.
- Returns:
True if the file drop zone is enabled, False otherwise.
- Return type:
True if the file drop zone feature is enabled based on the current environment.
- Validated by:
- field enable_proxy: bool = True
Determines if the proxy feature is enabled based on the current environment.
- Returns:
True if the proxy is enabled, False otherwise.
- Return type:
True if the proxy feature is enabled based on the current environment.
- field enable_vectorstore: bool = True
Determines if the vectorstore feature is enabled based on the current environment.
- Returns:
True if the vectorstore is enabled, False otherwise.
- Return type:
True if the vectorstore feature is enabled based on the current environment.
- Validated by:
- field enable_web_console_terminal: bool = True
Determines whether superusers can open a bash shell inside the server’s container from the web console.
The shell runs as the server’s own operating system user, with the server’s environment and credentials, inside whichever server process (and so whichever pod or container) accepted the connection. See
smarter.apps.dashboard.views.terminal_emulator.api.consumers.Set with
SMARTER_ENABLE_WEB_CONSOLE_TERMINAL. Defaults to False.- Returns:
True if the web console terminal is enabled, False otherwise.
- Return type:
True if superusers can open a bash shell inside the server’s container from the web console’s Terminal page. Off by default.
- Validated by:
- field log_level: int = 10
The logging level for the platform based on Python logging levels: logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL
- Constraints:
ge = 0
le = 50
- field static_files_on_cdn: bool = False
Determines whether the static files are served from the environment’s CDN, rather than by the server.
When true,
initialize_platformuploads them to the environment’s S3 bucket, understatic/, on each deployment, andSTATIC_URLis the CDN’s, e.g.https://cdn.platform.example.com/static/. Pages, cookies and the api stay on the platform’s own host: only static files come from the CDN. It needs AWS, and is ignored, with a warning, without it. See ADR-035.Set with
SMARTER_STATIC_FILES_ON_CDN. Defaults to False.- Returns:
True if the static files are served from the CDN, False otherwise.
- Return type:
True if the platform’s static files, the web console’s scripts among them, are uploaded to the environment’s S3 bucket and served from its CDN. Off by default: the server serves them.
- Validated by:
- field verbose_logging: bool = True
Whether to enable verbose logging for debugging purposes.
If True, enables verbose logging throughout the Smarter platform for debugging purposes. :type: bool :default: Value from
settings_defaults.VERBOSE_LOGGING:raises SmarterConfigurationError: If the value is not a boolean.Whether to enable verbose logging for debugging purposes.
- validator parse_debug_mode » debug_mode[source]
Validates the ‘debug_mode’ field.
- validator parse_developer_mode » developer_mode[source]
Validates the ‘developer_mode’ field.
- validator parse_dump_defaults » dump_defaults[source]
Validates the ‘dump_defaults’ field.
- validator parse_enable_dashboard_apply » enable_dropzone_manifest_apply[source]
Validates the ‘enable_dropzone_manifest_apply’ field.
- validator parse_enable_dashboard_passthrough_prompt » enable_dashboard_passthrough_prompt[source]
Validates the ‘enable_dashboard_passthrough_prompt’ field.
- validator parse_enable_vectorstore » enable_vectorstore[source]
Validates the ‘enable_vectorstore’ field.
- validator parse_enable_web_console_terminal » enable_web_console_terminal[source]
Validates the ‘enable_web_console_terminal’ field.
- validator parse_enabled_terminal_app » enable_dashboard_server_logs[source]
Validates the ‘enable_dashboard_server_logs’ field.
- pydantic model smarter.common.conf.settings.integrations.IntegrationSettings[source]
The credentials of third-party services: GitHub, Slack, Stripe and social login.
Show JSON schema
{ "title": "IntegrationSettings", "description": "The credentials of third-party services: GitHub, Slack, Stripe and social login.", "type": "object", "properties": { "github_token": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The platform's GitHub token, from GITHUB_TOKEN, for the GitHub REST api requests that retrieve remote SkillPlugin skills, and that open the bug reports of the platform's staff. Masked by pydantic SecretStr.", "examples": [ "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ], "title": "GitHub Token" }, "social_auth_google_oauth2_key": { "default": "**********", "description": "The OAuth2 key for Google social authentication. Masked by pydantic SecretStr.", "examples": [ "your-google-oauth2-key" ], "format": "password", "title": "Google OAuth2 Key", "type": "string", "writeOnly": true }, "social_auth_google_oauth2_secret": { "default": "**********", "description": "The OAuth2 secret for Google social authentication. Masked by pydantic SecretStr.", "examples": [ "your-google-oauth2-secret" ], "format": "password", "title": "Google OAuth2 Secret", "type": "string", "writeOnly": true }, "social_auth_github_key": { "default": "**********", "description": "The OAuth2 key for GitHub social authentication. Masked by pydantic SecretStr.", "examples": [ "your-github-oauth2-key" ], "format": "password", "title": "GitHub OAuth2 Key", "type": "string", "writeOnly": true }, "social_auth_github_secret": { "default": "**********", "description": "The OAuth2 secret for GitHub social authentication. Masked by pydantic SecretStr.", "examples": [ "your-github-oauth2-secret" ], "format": "password", "title": "GitHub OAuth2 Secret", "type": "string", "writeOnly": true }, "social_auth_linkedin_oauth2_key": { "default": "**********", "description": "The OAuth2 key for LinkedIn social authentication. Masked by pydantic SecretStr.", "examples": [ "your-linkedin-oauth2-key" ], "format": "password", "title": "LinkedIn OAuth2 Key", "type": "string", "writeOnly": true }, "social_auth_linkedin_oauth2_secret": { "default": "**********", "description": "The OAuth2 secret for LinkedIn social authentication. Masked by pydantic SecretStr.", "examples": [ "your-linkedin-oauth2-secret" ], "format": "password", "title": "LinkedIn OAuth2 Secret", "type": "string", "writeOnly": true }, "slack_bot_token": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "A Slack app's bot token, xoxb-..., which the platform posts its Kubernetes jobs' logs to Slack with. Masked by pydantic SecretStr.", "examples": [ "xoxb-xxxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx" ], "title": "Slack Bot Token" }, "stripe_live_secret_key": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "DEPRECATED: The secret key for Stripe live environment.", "examples": [ "sk_live_xxxxxxxxxxxxxxxxxxxxxxxx" ], "title": "Stripe Live Secret Key" }, "stripe_test_secret_key": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "DEPRECATED: The secret key for Stripe test environment.", "examples": [ "sk_test_xxxxxxxxxxxxxxxxxxxxxxxx" ], "title": "Stripe Test Secret Key" } } }
- Fields:
- Validators:
validate_social_auth_github_secret»social_auth_github_secretvalidate_social_auth_google_oauth2_key»social_auth_google_oauth2_keyvalidate_social_auth_google_oauth2_secret»social_auth_google_oauth2_secretvalidate_social_auth_linkedin_oauth2_key»social_auth_linkedin_oauth2_keyvalidate_social_auth_linkedin_oauth2_secret»social_auth_linkedin_oauth2_secret
- field github_token: SecretStr | None = SecretStr('**********')
The platform’s GitHub token, from
GITHUB_TOKEN.It is read from the first of
GITHUB_TOKEN,GH_TOKENandGITHUB_API_TOKENthat is set, each with or without theSMARTER_prefix (seeGITHUB_TOKEN_NAMES). It is used for two things:SkillPlugin skills. A SkillPlugin whose skill is in a GitHub repository lists the skill’s files with the GitHub git trees api. Without a token those requests are anonymous, and GitHub limits them to 60 per hour per client IP address, which hosts that share an address, such as GitHub Actions runners, reach quickly. Any token raises the limit, with no scopes: in GitHub Actions, the workflow’s own
GITHUB_TOKENwill do. Seesmarter.apps.llmtool.plugin.skill_sources.list_github_skill_files().Bug reports. The MCPServer’s staff-only tool
create_bug_reportopens a GitHub issue in a repository of The Smarter Project with it, when Smarter Sysadmin has diagnosed a bug and the staff member agrees to report it. For that, it must be a classic personal access token,ghp_..., with thepublic_reposcope, and the issue is written as its owner. Seesmarter.apps.mcpserver.services.github.bug_reports.create_bug_report().
The token is sent only to
api.github.com, and is never logged.- Type:
Optional[SecretStr]
- Default:
Value from
settings_defaults.GITHUB_TOKEN, None if it is not set.- Raises:
SmarterConfigurationError – If the value is not a SecretStr.
The platform’s GitHub token, from GITHUB_TOKEN, for the GitHub REST api requests that retrieve remote SkillPlugin skills, and that open the bug reports of the platform’s staff. Masked by pydantic SecretStr.
- Validated by:
- field slack_bot_token: SecretStr | None = SecretStr('**********')
A Slack app’s bot token,
xoxb-..., for the platform’s Slack service.The Helm chart’s init Job and nightly database backup post their outcome, and their log, to a Slack channel with it, when the chart’s
databaseInit.notifySlackChannelordatabaseScheduledBackup.notifySlackChannelnames one. The bot needs the scopeschat:writeandfiles:write, and must be a member of the channel. The optional Slack bot, the Helm chart’sslack-botsubchart, reads the same token fromSMARTER_SLACK_BOT_TOKEN.The token is sent only to
slack.com. Seesmarter.apps.infrastructure.services.slack.SlackWebApiService.- Type:
Optional[SecretStr]
- Default:
Value from
settings_defaults.SLACK_BOT_TOKEN, None if it is not set.- Raises:
SmarterConfigurationError – If the value is not a SecretStr.
A Slack app’s bot token, xoxb-…, which the platform posts its Kubernetes jobs’ logs to Slack with. Masked by pydantic SecretStr.
- Validated by:
- field social_auth_github_key: SecretStr = SecretStr('**********')
The OAuth2 key for GitHub social authentication.
Masked by pydantic SecretStr. This setting provides the OAuth2 client ID used for GitHub social authentication. It is required for enabling users to log in using their GitHub accounts.
- Type:
SecretStr
- Default:
Value from
settings_defaults.SOCIAL_AUTH_GITHUB_KEY- Raises:
SmarterConfigurationError – If the value is not a valid OAuth2 client ID
The OAuth2 key for GitHub social authentication. Masked by pydantic SecretStr.
- Validated by:
- field social_auth_github_secret: SecretStr = SecretStr('**********')
The OAuth2 secret for GitHub social authentication.
Masked by pydantic SecretStr. This setting provides the OAuth2 client secret used for GitHub social authentication. It is required for enabling users to log in using their GitHub accounts.
- Type:
SecretStr
- Default:
Value from
settings_defaults.SOCIAL_AUTH_GITHUB_SECRET- Raises:
SmarterConfigurationError – If the value is not a valid OAuth2 client secret
The OAuth2 secret for GitHub social authentication. Masked by pydantic SecretStr.
- Validated by:
- field social_auth_google_oauth2_key: SecretStr = SecretStr('**********')
The OAuth2 key for Google social authentication.
Masked by pydantic SecretStr. This setting provides the OAuth2 client ID used for Google social authentication. It is required for enabling users to log in using their Google accounts.
- Type:
SecretStr
- Default:
Value from
settings_defaults.SOCIAL_AUTH_GOOGLE_OAUTH2_KEY- Raises:
SmarterConfigurationError – If the value is not a valid OAuth2 client ID.
The OAuth2 key for Google social authentication. Masked by pydantic SecretStr.
- Validated by:
- field social_auth_google_oauth2_secret: SecretStr = SecretStr('**********')
The OAuth2 secret for Google social authentication.
Masked by pydantic SecretStr. This setting provides the OAuth2 client secret used for Google social authentication. It is required for enabling users to log in using their Google accounts.
- Type:
SecretStr
- Default:
Value from
settings_defaults.SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET- Raises:
SmarterConfigurationError – If the value is not a valid OAuth2 client secret
The OAuth2 secret for Google social authentication. Masked by pydantic SecretStr.
- Validated by:
- field social_auth_linkedin_oauth2_key: SecretStr = SecretStr('**********')
Deprecated since version 0.13.35.: This setting is deprecated and will be removed in a future release. LinkedIn social authentication is no longer supported or recommended for new deployments.
The OAuth2 key for LinkedIn social authentication. Masked by pydantic SecretStr. This setting provides the OAuth2 client ID used for LinkedIn social authentication. It was required for enabling users to log in using their LinkedIn accounts.
- Type:
SecretStr
- Default:
Value from
settings_defaults.SOCIAL_AUTH_LINKEDIN_OAUTH2- Raises:
SmarterConfigurationError – If the value is not a valid OAuth2 client ID
The OAuth2 key for LinkedIn social authentication. Masked by pydantic SecretStr.
- Validated by:
- field social_auth_linkedin_oauth2_secret: SecretStr = SecretStr('**********')
Deprecated since version 0.13.35.: This setting is deprecated and will be removed in a future release. LinkedIn social authentication is no longer supported or recommended for new deployments.
The OAuth2 secret for LinkedIn social authentication. Masked by pydantic SecretStr. This setting provides the OAuth2 client secret used for LinkedIn social authentication. It was required for enabling users to log in using their LinkedIn accounts.
- Type:
SecretStr
- Default:
Value from
settings_defaults.SOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET- Raises:
SmarterConfigurationError – If the value is not a valid OAuth2 client secret
The OAuth2 secret for LinkedIn social authentication. Masked by pydantic SecretStr.
- Validated by:
- field stripe_live_secret_key: SecretStr | None = SecretStr('**********')
Deprecated since version 0.13.0.: This setting is deprecated and will be removed in a future release. Please use the new payment processing configuration settings.
The secret key for Stripe live environment. This setting provides the secret key used to authenticate with Stripe’s live environment. It is used for processing real transactions and payments.
- Type:
Optional[str]
- Default:
Value from
settings_defaults.STRIPE_LIVE_SECRET_KEY- Raises:
SmarterConfigurationError – If the value is not a string.
DEPRECATED: The secret key for Stripe live environment.
- Validated by:
- field stripe_test_secret_key: SecretStr | None = SecretStr('**********')
Deprecated since version 0.13.0.: This setting is deprecated and will be removed in a future release. Please use the new payment processing configuration settings.
The secret key for Stripe test environment. This setting provides the secret key used to authenticate with Stripe’s test environment. It is used for processing test transactions and payments.
- Type:
Optional[str]
- Default:
Value from
settings_defaults.STRIPE_TEST_SECRET_KEY- Raises:
SmarterConfigurationError – If the value is not a string.
DEPRECATED: The secret key for Stripe test environment.
- Validated by:
- validator validate_github_token » github_token[source]
Validates the github_token field.
- validator validate_slack_bot_token » slack_bot_token[source]
Validates the slack_bot_token field.
- validator validate_social_auth_github_key » social_auth_github_key[source]
Validates the social_auth_github_key field.
- Parameters:
v (
SecretStr|None) – The GitHub OAuth2 key value to validate.- Returns:
The validated GitHub OAuth2 key.
- Return type:
SecretStr
- validator validate_social_auth_github_secret » social_auth_github_secret[source]
Validates the social_auth_github_secret field.
- Parameters:
v (
SecretStr|None) – The GitHub OAuth2 secret value to validate.- Returns:
The validated GitHub OAuth2 secret.
- Return type:
SecretStr
- validator validate_social_auth_google_oauth2_key » social_auth_google_oauth2_key[source]
Validates the social_auth_google_oauth2_key field.
- Parameters:
v (
SecretStr|None) – The Google OAuth2 key value to validate.- Returns:
The validated Google OAuth2 key.
- Return type:
SecretStr
- validator validate_social_auth_google_oauth2_secret » social_auth_google_oauth2_secret[source]
Validates the social_auth_google_oauth2_secret field.
- Parameters:
v (
SecretStr|None) – The Google OAuth2 secret value to validate.- Returns:
The validated Google OAuth2 secret.
- Return type:
SecretStr
- validator validate_social_auth_linkedin_oauth2_key » social_auth_linkedin_oauth2_key[source]
Validates the social_auth_linkedin_oauth2_key field.
- Parameters:
v (
SecretStr|None) – The LinkedIn OAuth2 key value to validate.- Returns:
The validated LinkedIn OAuth2 key.
- Return type:
SecretStr
- validator validate_social_auth_linkedin_oauth2_secret » social_auth_linkedin_oauth2_secret[source]
Validates the social_auth_linkedin_oauth2_secret field.
- Parameters:
v (
SecretStr|None) – The LinkedIn OAuth2 secret value to validate.- Returns:
The validated LinkedIn OAuth2 secret.
- Return type:
SecretStr
- validator validate_stripe_live_secret_key » stripe_live_secret_key[source]
Validates the stripe_live_secret_key field.
- Parameters:
v (
SecretStr|None) – The Stripe live secret key to validate.- Returns:
The validated Stripe live secret key.
- Return type:
SecretStr
- validator validate_stripe_test_secret_key » stripe_test_secret_key[source]
Validates the stripe_test_secret_key field.
- Parameters:
v (
SecretStr|None) – The Stripe test secret key to validate.- Returns:
The validated Stripe test secret key.
- Return type:
SecretStr
- pydantic model smarter.common.conf.settings.llm.LLMSettings[source]
LLM defaults, prompts, tools, plugins, extensions and the MCP server.
Show JSON schema
{ "title": "LLMSettings", "description": "LLM defaults, prompts, tools, plugins, extensions and the MCP server.", "type": "object", "properties": { "max_tool_rounds": { "default": 5, "description": "The most requests of one prompt that offer the LLM its tools.", "minimum": 1, "title": "Max Tool Rounds", "type": "integer" }, "prompt_history_max_age": { "default": 90, "description": "Days to keep chat sessions and their prompt history before they are deleted.", "minimum": 1, "title": "Prompt History Max Age", "type": "integer" }, "plugin_max_data_results": { "default": 50, "description": "A global maximum number of data row results that can be returned by any Smarter plugin.", "exclusiveMinimum": 0, "title": "Plugin Max Data Results", "type": "integer" }, "extension_registry_url": { "default": "https://smarter-sh.github.io/extensions-registry/index.json", "description": "The url of the Smarter Extension registry's signed index, index.json.", "examples": [ "https://smarter-sh.github.io/extensions-registry/index.json" ], "title": "Extension Registry URL", "type": "string" }, "extension_registry_public_key": { "default": "i0kR0g3ZEf6YzyyjnQbIwq85D7QGwTrvzubYsw6sdtg=", "description": "The base64 Ed25519 public key that verifies the extension registry's index. Empty disables the registry.", "title": "Extension Registry Public Key", "type": "string" }, "mcpserver_rate_limit": { "default": 1200, "description": "The maximum number of requests per minute that one client IP address may send to the MCPServer's endpoints. 0 disables the limit.", "minimum": 0, "title": "MCP Server Rate Limit", "type": "integer" }, "llm_default_provider": { "default": "openai", "description": "The default LLM provider to use for language model interactions.", "examples": [ "openai", "anthropic", "gemini", "llama" ], "title": "Default LLM Provider", "type": "string" }, "llm_default_system_role": { "default": "You are a helpful llmclient. When given the opportunity to utilize function calling, you should always do so. This will allow you to provide the best possible responses to the user. If you are unable to provide a response, you should prompt the user for more information. If you are still unable to provide a response, you should inform the user that you are unable to help them at this time.", "description": "The default system role prompt to use for language model interactions.", "examples": [ "You are a helpful llmclient..." ], "title": "Default LLM System Role", "type": "string" }, "llm_default_temperature": { "default": 1.0, "description": "The default temperature to use for language model interactions.", "examples": [ 0.0, 0.5, 1.0 ], "title": "Default LLM Temperature", "type": "number" }, "llm_default_max_tokens": { "default": 2048, "description": "The default maximum number of tokens to generate for language model interactions.", "examples": [ 256, 512, 1024, 2048 ], "minimum": 1, "title": "Default LLM Max Tokens", "type": "integer" }, "prompt_threads": { "default": 32, "description": "The threads in each web server process that run streamed chat prompts.", "minimum": 1, "title": "Prompt Threads", "type": "integer" } } }
- Fields:
- Validators:
- field extension_registry_public_key: str = 'i0kR0g3ZEf6YzyyjnQbIwq85D7QGwTrvzubYsw6sdtg='
The Ed25519 public key, base64, that verifies the signature of the extension registry’s index.
It is public, not a secret. While it is empty, the registry is disabled: extensions can only be installed from uploaded archives, and updates are not checked. :type: str :default: Value from
settings_defaults.EXTENSION_REGISTRY_PUBLIC_KEYThe base64 Ed25519 public key that verifies the extension registry’s index. Empty disables the registry.
- field extension_registry_url: str = 'https://smarter-sh.github.io/extensions-registry/index.json'
The url of the Smarter Extension registry’s index.
The registry lists the extensions that administrators may install from the Django admin console, their versions, and their publishers’ trust badges. The platform checks it daily for updates to installed extensions. Its signature, at the same url with
.sigappended, is verified withextension_registry_public_key. :type: str :default: Value fromsettings_defaults.EXTENSION_REGISTRY_URLThe url of the Smarter Extension registry’s signed index, index.json.
- Validated by:
- field llm_default_max_tokens: int = 2048
The default maximum number of tokens to generate for language model interactions.
This setting specifies the upper limit on the number of tokens that the language model can generate in response to a single request. It helps control the length of the output and manage resource usage.
- Type:
- Default:
Value from
settings_defaults.LLM_DEFAULT_MAX_TOKENS- Raises:
SmarterConfigurationError – If the value is not a positive integer.
The default maximum number of tokens to generate for language model interactions.
- Constraints:
ge = 1
- Validated by:
- field llm_default_provider: str = 'openai'
The default LLM provider to use for language model interactions.
This setting specifies which language model provider should be used by default for processing natural language tasks. It determines the backend service that will handle requests for language generation, understanding, and other related functions.
- Type:
- Default:
Value from
settings_defaults.LLM_DEFAULT_PROVIDER- Raises:
SmarterConfigurationError – If the value is not a valid LLM provider name
The default LLM provider to use for language model interactions.
- Validated by:
- field llm_default_system_role: str = 'You are a helpful llmclient. When given the opportunity to utilize function calling, you should always do so. This will allow you to provide the best possible responses to the user. If you are unable to provide a response, you should prompt the user for more information. If you are still unable to provide a response, you should inform the user that you are unable to help them at this time.'
The default system role prompt to use for language model interactions.
This setting provides the default system role prompt that guides the behavior of the language model during interactions. It helps define the context and tone of the responses generated by the model.
- Type:
- Default:
Value from
settings_defaults.LLM_DEFAULT_SYSTEM_ROLE- Raises:
SmarterConfigurationError – If the value is not a string.
The default system role prompt to use for language model interactions.
- Validated by:
- field llm_default_temperature: float = 1.0
The default temperature to use for language model interactions.
This setting controls the randomness of the language model’s output. A lower temperature (e.g., 0.0) results in more deterministic and focused responses, while a higher temperature (e.g., 1.0) produces more diverse and creative outputs.
- Type:
- Default:
Value from
settings_defaults.LLM_DEFAULT_TEMPERATURE- Raises:
SmarterConfigurationError – If the value is not a float between 0.
The default temperature to use for language model interactions.
- Validated by:
- field max_tool_rounds: int = 5
The most requests of one prompt that offer the LLM its tools.
An LLM often needs more than one round of tool calls, e.g. a forecast, and then an image search with the forecast’s place, or a chain of MCP tool calls, each using the last one’s result. One round can hold several tool calls. After this many requests with tools, the LLM is sent the tool results without tools, so that it answers with what it has.
- Type:
- Default:
Value from
settings_defaults.MAX_TOOL_ROUNDS, 5- Raises:
SmarterConfigurationError – If the value is not a positive integer.
The most requests of one prompt that offer the LLM its tools.
- Constraints:
ge = 1
- Validated by:
- field mcpserver_rate_limit: int = 1200
The maximum number of requests per minute that one client IP address may send to the MCPServer’s endpoints.
The MCPServer,
smarter.apps.mcpserver, serves its public tools without authentication, so the limit protects the platform’s database from a client that floods it. Requests beyond the limit are answered429 Too Many Requestsuntil the minute ends. The platform’s own MCPClients count too: they connect from the platform’s egress addresses, and each tool call is about three requests, so set the limit well above the platform’s own traffic. 0 disables the limit. :type: int :default: Value fromsettings_defaults.MCPSERVER_RATE_LIMIT:raises SmarterConfigurationError: If the value is not a non-negative integer.The maximum number of requests per minute that one client IP address may send to the MCPServer’s endpoints. 0 disables the limit.
- Constraints:
ge = 0
- Validated by:
- field plugin_max_data_results: int = 50
A global maximum number of data row results that can be returned by any Smarter plugin.
This setting helps to prevent excessive data retrieval that could impact performance or lead to resource exhaustion. Plugins should respect this limit when querying data sources and returning results to ensure efficient operation of the platform. :type: int :default: Value from
settings_defaults.PLUGIN_MAX_DATA_RESULTS:raises SmarterConfigurationError: If the value is not a positive integer.A global maximum number of data row results that can be returned by any Smarter plugin.
- Constraints:
gt = 0
- Validated by:
- field prompt_history_max_age: int = 90
Days to keep chat sessions and their prompt history before they are deleted.
Every prompt of a chat session (a
Prompt) saves aPromptHistoryrow with the request, the response and the conversation’s messages, plus aPromptToolCallorPromptPluginUsagerow for each tool or plugin it used. Celery Beat runspurge_prompt_history()once a day, which deletes these rows when they are older than this, then the sessions that are older than this and have none left. A session that is still in use keeps its recent rows.Set it with
SMARTER_PROMPT_HISTORY_MAX_AGE.- Type:
- Default:
Value from
settings_defaults.PROMPT_HISTORY_MAX_AGE, 90- Raises:
SmarterConfigurationError – If the value is not a positive integer.
Days to keep chat sessions and their prompt history before they are deleted.
- Constraints:
ge = 1
- Validated by:
- field prompt_threads: int = 32
The threads in each web server process that run streamed chat prompts, at most.
A prompt holds its thread for as long as it runs, mostly waiting on the LLM and its tools, so the threads are cheap. A process runs this many prompts at once, and queues the next ones. The pool is the prompts’ own, apart from the event loop’s default executor, where Django renders error pages and asyncio resolves host names. See
smarter.apps.prompt.progress.prompt_executor().Set it with
SMARTER_PROMPT_THREADS.- Type:
- Default:
Value from
settings_defaults.PROMPT_THREADS, 32 if it is not set.- Raises:
SmarterConfigurationError – If the value is not a positive integer.
The threads in each web server process that run streamed chat prompts.
- Constraints:
ge = 1
- Validated by:
- validator parse_max_tool_rounds » max_tool_rounds[source]
Validates the ‘max_tool_rounds’ field.
- validator parse_mcpserver_rate_limit » mcpserver_rate_limit[source]
Validates the ‘mcpserver_rate_limit’ field.
- validator parse_plugin_max_data_results » plugin_max_data_results[source]
Validates the ‘plugin_max_data_results’ field.
- validator parse_prompt_history_max_age » prompt_history_max_age[source]
Validates the ‘prompt_history_max_age’ field.
- validator parse_prompt_threads » prompt_threads[source]
Validates the ‘prompt_threads’ field.
- validator validate_extension_registry_url » extension_registry_url[source]
Validates the ‘extension_registry_url’ field: an https url, or the default if empty.
- validator validate_llm_default_provider » llm_default_provider[source]
Validates the llm_default_provider field.
- validator validate_llm_default_system_role » llm_default_system_role[source]
Validates the llm_default_system_role field.
- validator validate_openai_default_max_completion_tokens » llm_default_max_tokens[source]
Validates the llm_default_max_tokens field.
- pydantic model smarter.common.conf.settings.project.ProjectSettings[source]
Facts about the running software: versions, urls of the Smarter project, and paths.
Show JSON schema
{ "title": "ProjectSettings", "description": "Facts about the running software: versions, urls of the Smarter project, and paths.", "type": "object", "properties": {} }
- pydantic model smarter.common.conf.settings.security.SecuritySettings[source]
The superuser, encryption keys, trusted hosts and request throttling.
Show JSON schema
{ "title": "SecuritySettings", "description": "The superuser, encryption keys, trusted hosts and request throttling.", "type": "object", "properties": { "admin_username": { "default": "admin", "description": "The username of the platform's superuser, which manage.py initialize_platform creates.", "examples": [ "admin" ], "title": "Administrator Username", "type": "string" }, "admin_password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The password of the platform's superuser, which manage.py initialize_platform creates.", "examples": [ "your-admin-password" ], "title": "Administrator Password" }, "sensitive_files_amnesty_patterns": { "default": [ "^/$", "^/static(/.*)?$", "^/api/v\\d+(\\.\\d+)?/.+", "^/api/web/.+", "^/dashboard(/.*)?$", "^/docs/manifest(/.*)?$", "^/docs/json-schema(/.*)?$", "^/config/?$", "^/login/?$", "^/admin/?$" ], "description": "List of regex patterns for sensitive file amnesty.", "examples": [ "^/dashboard/account/password-reset-link/[^/]+/[^/]+/$", "^/api(/.*)?$", "^/admin(/.*)?$" ], "items": { "format": "regex", "type": "string" }, "title": "Sensitive Files Amnesty Patterns", "type": "array" }, "fernet_encryption_key": { "default": "**********", "description": "The Fernet encryption key used for encrypting Smarter Secrets data.", "examples": [ "gAAAAABh..." ], "format": "password", "title": "Fernet Encryption Key", "type": "string", "writeOnly": true }, "internal_ip_prefixes": { "default": [ "192.168." ], "description": "A list of internal IP prefixes used for security and middleware features.", "examples": [ "192.168." ], "items": { "type": "string" }, "title": "Internal IP Prefixes", "type": "array" }, "local_hosts": { "default": [ "localhost", "127.0.0.1", "localhost:9357", "127.0.0.1:9357", "localhost:5173", "testserver" ], "description": "A list of hostnames considered local for development and testing purposes.", "examples": [ "localhost", "127.0.0.1", "localhost:9357", "127.0.0.1:9357", "localhost:5173", "testserver" ], "items": { "type": "string" }, "title": "Local Hosts", "type": "array" }, "secret_key": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": "**********", "description": "The Django secret key for cryptographic signing.", "examples": [ "your-django-secret-key" ], "title": "Django Secret Key" }, "throttle_rate_anon": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "120/minute", "description": "The request rate limit of each anonymous client, by IP address. None disables it.", "examples": [ "120/minute", "10/second", "none" ], "title": "Anonymous Throttle Rate" }, "throttle_rate_user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "600/minute", "description": "The request rate limit of each authenticated user. None disables it.", "examples": [ "600/minute", "20/second", "none" ], "title": "User Throttle Rate" } } }
- Fields:
- Validators:
- field admin_password: SecretStr | None = None
The password of the platform’s superuser.
manage.py initialize_platformgives the superuser and the example users this password, unless--passwordgives another. Set it withSMARTER_ADMIN_PASSWORD. Reading it from the environment keeps it off the command line, and out of the init Job’s log.- Type:
Optional[SecretStr]
- Default:
Value from
settings_defaults.ADMIN_PASSWORD, None if it is not set.- Raises:
SmarterConfigurationError – If the value is not a SecretStr.
The password of the platform’s superuser, which manage.py initialize_platform creates.
- Validated by:
- field admin_username: str = 'admin'
The username of the platform’s superuser.
manage.py initialize_platformcreates this superuser, unless--usernamenames another. Set it withSMARTER_ADMIN_USERNAME.- Type:
- Default:
Value from
settings_defaults.ADMIN_USERNAME,adminif it is not set.- Raises:
SmarterConfigurationError – If the value is not a non-empty string.
The username of the platform’s superuser, which manage.py initialize_platform creates.
- Validated by:
- field fernet_encryption_key: SecretStr = SecretStr('**********')
The Fernet encryption key used for encrypting Smarter Secrets data.
This setting provides the key used for symmetric encryption and decryption of sensitive data within the platform. The key should be a URL-safe base64-encoded 32-byte key.
- Type:
- Default:
Value from
settings_defaults.FERNET_ENCRYPTION_KEY- Raises:
SmarterConfigurationError – If the value is not a valid Fernet key.
The Fernet encryption key used for encrypting Smarter Secrets data.
- Validated by:
- field internal_ip_prefixes: List[str] = ['192.168.']
Supplemental list of internal IP prefixes used in smarter.apps.llmclient.middleware.security.SmarterSecurityMiddleware.
and smarter.lib.django.middleware security features.
The default value is based on the default internal IP range used by Kubernetes clusters by default unless otherwise configured.
A list of internal IP prefixes used for security and middleware features. This setting defines IP address prefixes that are considered internal to the platform. It is used to identify requests originating from trusted internal sources, enabling specific security measures and middleware behaviors.
- Type:
List[str]
- Default:
Value from
settings_defaults.INTERNAL_IP_PREFIXES- Raises:
SmarterConfigurationError – If the value is not a list of strings matching settings_defaults.INTERNAL_IP_PREFIXES
A list of internal IP prefixes used for security and middleware features.
- Validated by:
- field local_hosts: List[str] = ['localhost', '127.0.0.1', 'localhost:9357', '127.0.0.1:9357', 'localhost:5173', 'testserver']
A list of hostnames considered local for development and testing purposes.
This setting defines hostnames that are treated as local addresses by the platform. It is useful for distinguishing between local and remote requests, especially during development and testing.
- Type:
List[str]
- Default:
Value from
settings_defaults.LOCAL_HOSTS- Raises:
SmarterConfigurationError – If the value is not a list of strings matching settings_defaults.LOCAL_HOSTS
A list of hostnames considered local for development and testing purposes.
- Validated by:
- field secret_key: SecretStr | None = SecretStr('**********')
The Django secret key for cryptographic signing.
This setting provides the secret key used by Django for cryptographic signing. It is essential for maintaining the security of sessions, cookies, and other cryptographic operations within the Django framework.
- Type:
Optional[str]
- Default:
Value from
settings_defaults.SECRET_KEY- Raises:
SmarterConfigurationError – If the value is not a string.
The Django secret key for cryptographic signing.
- Validated by:
- field sensitive_files_amnesty_patterns: List[Pattern] = [re.compile('^/$'), re.compile('^/static(/.*)?$'), re.compile('^/api/v\\d+(\\.\\d+)?/.+'), re.compile('^/api/web/.+'), re.compile('^/dashboard(/.*)?$'), re.compile('^/docs/manifest(/.*)?$'), re.compile('^/docs/json-schema(/.*)?$'), re.compile('^/config/?$'), re.compile('^/login/?$'), re.compile('^/admin/?$')]
Sensitive file amnesty patterns used by smarter.lib.django.middleware.sensitive_files.SensitiveFileAccessMiddleware.
Requests matching these patterns will be allowed even if they match sensitive file names.
Note
Do not modify this setting unless you fully understand the implications of doing so.
List of regex patterns for sensitive file amnesty. This setting defines a list of regular expression patterns that identify files considered sensitive. Files matching these patterns may be subject to special handling, such as exclusion from certain operations or additional security measures.
- Type:
List[Pattern]
- Default:
Value from
settings_defaults.SENSITIVE_FILES_AMNESTY_PATTERNS- Raises:
SmarterConfigurationError – If the value is not a list of valid regex patterns.
List of regex patterns for sensitive file amnesty.
- Validated by:
- field throttle_rate_anon: str | None = '120/minute'
The request rate limit of each anonymous client, by IP address.
Applies to Django REST Framework views and to the apis that a deployed LLMClient serves, e.g. the prompt api of a page that embeds Smarter Chat. A client that exceeds it receives HTTP 429 Too Many Requests with a
Retry-Afterheader. Seesmarter.lib.drf.throttling.- Type:
Optional[str]
- Default:
Value from
settings_defaults.THROTTLE_RATE_ANON- Raises:
SmarterConfigurationError – If the value is not a rate, e.g.
120/minute, ornone.
The request rate limit of each anonymous client, by IP address. None disables it.
- Validated by:
- field throttle_rate_user: str | None = '600/minute'
The request rate limit of each authenticated user.
Applies to Django REST Framework views and to the apis that a deployed LLMClient serves. A user who exceeds it receives HTTP 429 Too Many Requests with a
Retry-Afterheader. Seesmarter.lib.drf.throttling.- Type:
Optional[str]
- Default:
Value from
settings_defaults.THROTTLE_RATE_USER- Raises:
SmarterConfigurationError – If the value is not a rate, e.g.
600/minute, ornone.
The request rate limit of each authenticated user. None disables it.
- Validated by:
- validator parse_sensitive_files_amnesty_patterns » sensitive_files_amnesty_patterns[source]
Validates the ‘sensitive_files_amnesty_patterns’ field.
- Parameters:
v (
List[str] |str|None) – the sensitive_files_amnesty_patterns value to validate- Returns:
The validated sensitive_files_amnesty_patterns.
- Return type:
Examples
>>> parse_sensitive_files_amnesty_patterns([r"^/api(/.*)?$", r"^/admin(/.*)?$"]) [re.compile('^/api(/.*)?$'), re.compile('^/admin(/.*)?$')]
- validator validate_admin_password » admin_password[source]
Validates the admin_password field.
- validator validate_admin_username » admin_username[source]
Validates the admin_username field.
- validator validate_fernet_encryption_key » fernet_encryption_key[source]
Validates the fernet_encryption_key field.
- Parameters:
v (
SecretStr|None) – The Fernet encryption key value to validate.- Raises:
ValueError – If the Fernet encryption key is invalid.
SmarterValueError – If the Fernet encryption key is not found.
- Returns:
The validated Fernet encryption key.
- Return type:
SecretStr|None
- validator validate_internal_ip_prefixes » internal_ip_prefixes[source]
Validates the internal_ip_prefixes field.
- validator validate_local_hosts » local_hosts[source]
Validates the local_hosts field.
- validator validate_secret_key » secret_key[source]
Validates the secret_key field.
- Parameters:
v (
SecretStr|None) – The secret key value to validate.- Returns:
The validated secret key.
- Return type:
SecretStr
- validator validate_throttle_rate_anon » throttle_rate_anon[source]
Validates the throttle_rate_anon field.
- pydantic model smarter.common.conf.settings.tasks.TaskSettings[source]
The Celery queues, retries and LLMClient deployment tasks.
Show JSON schema
{ "title": "TaskSettings", "description": "The Celery queues, retries and LLMClient deployment tasks.", "type": "object", "properties": { "llmclient_tasks_create_dns_record": { "default": true, "description": "True if DNS records should be created for llmclient tasks.", "title": "LLMClient Tasks Create DNS Record", "type": "boolean" }, "llmclient_tasks_create_ingress_manifest": { "default": true, "description": "True if ingress manifests should be created for llmclient tasks.", "title": "LLMClient Tasks Create Ingress Manifest", "type": "boolean" }, "llmclient_tasks_default_ttl": { "default": 600, "description": "Default TTL (time to live) for DNS records created in AWS Route53 during LLMClient deployment.", "minimum": 0, "title": "LLMClient Tasks Default TTL", "type": "integer" }, "llmclient_tasks_celery_max_retries": { "default": 3, "description": "Maximum number of retries for llmclient tasks in Celery.", "exclusiveMinimum": 0, "title": "LLMClient Tasks Celery Max Retries", "type": "integer" }, "llmclient_tasks_celery_retry_backoff": { "default": true, "description": "If True, enables exponential backoff for Celery task retries related to LLMClient deployment and management", "title": "LLMClient Tasks Celery Retry Backoff", "type": "boolean" }, "llmclient_tasks_celery_task_queue": { "default": "default_celery_task_queue", "description": "The Celery task queue name for llmclient tasks.", "title": "LLMClient Tasks Celery Task Queue", "type": "string" }, "infrastructure_tasks_celery_task_queue": { "default": "infrastructure_celery_task_queue", "description": "The Celery task queue name for infrastructure tasks, which deploy, verify and destroy cloud, Kubernetes and DNS resources.", "title": "Infrastructure Tasks Celery Task Queue", "type": "string" } } }
- Fields:
- Validators:
parse_llmclient_tasks_celery_max_retries»llmclient_tasks_celery_max_retriesparse_llmclient_tasks_celery_retry_backoff»llmclient_tasks_celery_retry_backoffparse_llmclient_tasks_create_dns_record»llmclient_tasks_create_dns_recordparse_llmclient_tasks_create_ingress_manifest»llmclient_tasks_create_ingress_manifestparse_llmclient_tasks_default_ttl»llmclient_tasks_default_ttlvalidate_infrastructure_tasks_celery_task_queue»infrastructure_tasks_celery_task_queuevalidate_llmclient_tasks_celery_task_queue»llmclient_tasks_celery_task_queue
- field infrastructure_tasks_celery_task_queue: str = 'infrastructure_celery_task_queue'
The Celery task queue name for infrastructure tasks.
Infrastructure tasks deploy, verify and destroy cloud, Kubernetes and DNS resources, such as an LLMClient’s DNS record, ingress and certificate, an LLMHost’s node group, or a vectorstore’s database. They can take many minutes, so they run in their own queue, served by their own Celery worker, and never block the operational tasks of llmclient_tasks_celery_task_queue, such as prompt history, charges and budgets.
- Type:
- Default:
Value from
settings_defaults.INFRASTRUCTURE_TASKS_CELERY_TASK_QUEUE- Raises:
SmarterConfigurationError – If the value is not a string.
The Celery task queue name for infrastructure tasks, which deploy, verify and destroy cloud, Kubernetes and DNS resources.
- Validated by:
- field llmclient_tasks_celery_max_retries: int = 3
Maximum number of retries for llmclient tasks in Celery.
- Type:
- Default:
Value from
settings_defaults.LLM_CLIENT_TASKS_CELERY_MAX_RETRIES- Raises:
SmarterConfigurationError – If the value is not a non-negative integer.
Maximum number of retries for llmclient tasks in Celery.
- Constraints:
gt = 0
- Validated by:
- field llmclient_tasks_celery_retry_backoff: bool = True
If True, enables exponential backoff for Celery task retries related to LLMClient deployment and management.
- Type:
- Default:
Value from
settings_defaults.LLM_CLIENT_TASKS_CELERY_RETRY_BACKOFF- Raises:
SmarterConfigurationError – If the value is not a boolean.
If True, enables exponential backoff for Celery task retries related to LLMClient deployment and management
- Validated by:
- field llmclient_tasks_celery_task_queue: str = 'default_celery_task_queue'
The Celery task queue name for llmclient tasks.
- Type:
- Default:
Value from
settings_defaults.LLM_CLIENT_TASKS_CELERY_TASK_QUEUE- Raises:
SmarterConfigurationError – If the value is not a string.
The Celery task queue name for llmclient tasks.
- Validated by:
- field llmclient_tasks_create_dns_record: bool = True
Set these to true if we DO NOT place a wildcard A record in the customer API domain.
requiring that every llmclient have its own A record. This is the default behavior. For programmatically creating DNS records in AWS Route53 during LLMClient deployment.
- Type:
- Default:
Value from
settings_defaults.LLM_CLIENT_TASKS_CREATE_DNS_RECORD- Raises:
SmarterConfigurationError – If the value is not a boolean.
True if DNS records should be created for llmclient tasks.
- Validated by:
- field llmclient_tasks_create_ingress_manifest: bool = True
True if ingress manifests should be created for llmclient tasks.
For programmatically creating ingress manifests during LLMClient deployment. :type: bool :default: Value from
settings_defaults.LLM_CLIENT_TASKS_CREATE_INGRESS_MANIFEST:raises SmarterConfigurationError: If the value is not a boolean.True if ingress manifests should be created for llmclient tasks.
- Validated by:
- field llmclient_tasks_default_ttl: int = 600
Default TTL (time to live) for DNS records created in AWS Route53 during LLMClient deployment.
- Type:
- Default:
Value from
settings_defaults.LLM_CLIENT_TASKS_DEFAULT_TTL- Raises:
SmarterConfigurationError – If the value is not a non-negative integer.
Default TTL (time to live) for DNS records created in AWS Route53 during LLMClient deployment.
- Constraints:
ge = 0
- Validated by:
- validator parse_llmclient_tasks_celery_max_retries » llmclient_tasks_celery_max_retries[source]
Validates the ‘llmclient_tasks_celery_max_retries’ field.
- validator parse_llmclient_tasks_celery_retry_backoff » llmclient_tasks_celery_retry_backoff[source]
Validates the ‘llmclient_tasks_celery_retry_backoff’ field.
- validator parse_llmclient_tasks_create_dns_record » llmclient_tasks_create_dns_record[source]
Validates the ‘llmclient_tasks_create_dns_record’ field.
- validator parse_llmclient_tasks_create_ingress_manifest » llmclient_tasks_create_ingress_manifest[source]
Validates the ‘llmclient_tasks_create_ingress_manifest’ field.
- validator parse_llmclient_tasks_default_ttl » llmclient_tasks_default_ttl[source]
Validates the ‘llmclient_tasks_default_ttl’ field.
- validator validate_infrastructure_tasks_celery_task_queue » infrastructure_tasks_celery_task_queue[source]
Validates the infrastructure_tasks_celery_task_queue field.
- validator validate_llmclient_tasks_celery_task_queue » llmclient_tasks_celery_task_queue[source]
Validates the llmclient_tasks_celery_task_queue field.
Helpers
Utility functions for settings.
The field validators of the Settings use these, so that the same rule is written once.
- smarter.common.conf.util.THROTTLE_RATE_DISABLED = ('none', 'off', 'disabled')
The values that disable a throttle.
('none', 'off', 'disabled')
- smarter.common.conf.util.THROTTLE_RATE_PATTERN: Pattern = re.compile('^\\d+/(s|sec|second|m|min|minute|h|hour|d|day)$')
requests per second, minute, hour or day.
- Type:
A Django REST Framework throttle rate
- smarter.common.conf.util.before_field_validator(*args, **kwargs)[source]
Wrapper for pydantic field_validator with mode=’before’.
- smarter.common.conf.util.parse_int_setting(field_name, v, default, minimum=None, maximum=None)[source]
Parse an integer setting, e.g.
"300"from an environment variable.An empty value, or the placeholder of a missing one, is replaced by
default, which is parsed and checked like any other value.- Parameters:
field_name (
str) – The name of the field, for the error message.v (
object) – The value to parse: an int, or a string of one.default (
object) – The value to use ifvis empty.minimum (
int|None) – The smallest value allowed, or None for no lower bound.maximum (
int|None) – The largest value allowed, or None for no upper bound.
- Return type:
- Returns:
The value, as an int.
- Raises:
SmarterConfigurationError – If the value isn’t an integer, or is out of bounds.