{% extends "base.html" %} {% import "_ui.html" as ui %} {% block title %}AI settings{% endblock %} {% block crumbs %}AI provider{% endblock %} {% block content %}
Which provider and model ti2dac uses, its API keys, how much it has used, and whether requests are currently allowed.
ai.daily_request_limitStored in the server's {{ env_path }} (git-ignored, owner-only), never in the database, and never shown again.
A new key is used by the next job; no restart needed.
{{ k.var }}
This key comes from the server's environment. Saving here overrides it until the next restart, when the environment value wins again; change it where ti2dac is started to make it permanent.
{% endif %} {% endif %}Only admins can add or change keys.
{% endif %}Which provider and model ti2dac uses. Saved in the server's .ti2dac/ai_models.json (overrides ti2dac.yaml);
jobs started after saving use it, no restart needed.{% if model_choice.updated_by %} Last changed by {{ model_choice.updated_by }}, {{ model_choice.updated_at[:16]|replace("T", " ") }} UTC.{% endif %}
.env) to manage the model on this page.{% if b.active %}Uses {{ b.main }}{% for st, m in b.stages.items() if m %}; {{ st }}: {{ m }}{% endfor %}. {% endif %}Only admins can change the model.
| Model | Price (input / output) | {% if b.provider == "anthropic" %}Refusal fallback | {% endif %}Notes |
|---|---|---|---|
{{ m.id }} | {{ m.price }} | {% if b.provider == "anthropic" %}{{ "yes" if m.fallback else "no" }} | {% endif %}{{ m.note }} |
List prices; cache reads and writes are priced separately. A fallback model answers when the chosen one declines a security report.
ai.daily_request_limit){% endif %}{{ ai.message }}{{ v }}An admin can clear the pause after the cause is fixed (new key, quota reset, billing).
{% endif %}How ti2dac protects your quota when the provider pushes back.
| State | Meaning | What happens |
|---|---|---|
| {{ ui.status("rate limited", "warn") }} | Too many requests per minute | Paused until the provider's retry time (usually seconds to a minute), then resumes by itself |
| {{ ui.status("quota exhausted", "bad") }} | Daily/free-tier quota, credit balance or spend limit used up | Paused until the reset time the provider gave; no retries |
| {{ ui.status("daily cap", "bad") }} | Your own ai.daily_request_limit reached | Paused until local midnight |
| {{ ui.status("auth error", "bad") }} | Key missing, invalid or without permission | Paused until fixed and cleared |
| {{ ui.status("refused", "warn") }} | The model declined one request (safety filter) | Not a pause; that rule is skipped with a warning |
| {{ ui.status("unavailable", "warn") }} | Provider down or overloaded (connection error, timeout, 5xx/529) after retries | Not a pause; uses ai.failover_provider if set and the report's TLP allows it, otherwise that step fails with a retry command |
console.anthropic.com with your company account, add billing, and create a key under API keys (one key per environment)..env yourself, export it in your shell, or run ant auth login:
ti2dac ai-status.A Claude.ai or Claude Code subscription is not an API key: API usage is billed separately in the Console.
aistudio.google.com → Get API key, in a Google Cloud project with billing enabled (paid tier).ai.daily_request_limit in ti2dac.yaml a little under your quota.{{ ui.icon("shield", "sm") }} Keys set here go to the server's .env file, never to the database or the audit log
(which records only who changed which provider's key, and its last 4 characters). Prefer HTTPS when the server is not on localhost.