> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thig.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Model Configuration

> Configure AI model tiers, providers, and allowed models for your organization

# AI Model Configuration

thig.ai uses a tiered AI model system that automatically selects the right model based on the task being performed.

## Model Tiers

| Tier         | Use Cases                                   | Speed   | Quality |
| ------------ | ------------------------------------------- | ------- | ------- |
| **Fast**     | Suggestions, coaching, template enhancement | Fastest | Good    |
| **Balanced** | Chat conversations, improvements, roadmaps  | Medium  | Great   |
| **Powerful** | PRD generation, technical specs             | Slower  | Best    |

Each tier maps to a specific model per provider. For example:

* **Fast:** GPT-4o-mini, Claude 3.5 Haiku, Gemini Flash
* **Balanced:** GPT-4o, Claude 3.5 Sonnet, Gemini Pro
* **Powerful:** GPT-4, Claude 3 Opus, Gemini Ultra

## Organization AI Settings

*Admin/Owner only*

Go to **Settings > AI Configuration** (`/admin/settings/ai-config`) to configure:

### Default Provider and Tier

Choose which AI provider and tier your organization uses by default:

* **Default Provider** — OpenAI, Anthropic, or Gemini
* **Default Tier** — Fast, Balanced, or Powerful

### Task-Level Overrides

Override the model tier for specific tasks:

| Task              | Default Tier | Can Override To |
| ----------------- | ------------ | --------------- |
| Chat conversation | Balanced     | Any tier        |
| PRD generation    | Powerful     | Any tier        |
| AI suggestions    | Fast         | Any tier        |
| AI coaching       | Fast         | Any tier        |
| Technical specs   | Powerful     | Any tier        |
| User stories      | Balanced     | Any tier        |
| Roadmap           | Balanced     | Any tier        |

### Allowed Models

Restrict which models your organization can use. When configured, members can only select from the approved model list.

## Personal Model Selection

Individual users can select their preferred model in **Settings > AI Keys** (BYOK page):

* Choose a preferred model per provider
* Personal preference takes priority over org defaults when using BYOK
* Model selection respects the organization's allowed models list

## Resolution Order

When an AI request is made, the model is resolved through this cascade:

1. **User's personal preference** (if using BYOK)
2. **Organization's task-level override** (if configured)
3. **Organization's allowed models** (tier-appropriate model)
4. **Global model registry** (platform defaults)
5. **Hardcoded fallbacks** (last resort)

## SuperAdmin: Model Registry

*SuperAdmin only*

The platform-wide model registry at `/superadmin/ai-models` allows SuperAdmins to:

* Add new AI models with pricing, context window, and tier classification
* Update existing model configurations
* Set recommendations for each tier/provider combination
* View cost-per-token pricing for budgeting
