> For the complete documentation index, see [llms.txt](https://docs.testvibe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testvibe.com/ai-generation/choose-agent-and-model.md).

# Choose an Agent and Model

Generation settings live in **Settings → AI Model**. They control how much reasoning effort the generation agent spends per generation and how long a single generation is allowed to run.

AI runs on TestVibe's metered first-party service — usage is billed in credits and you do not need to provide a provider API key.

## The Settings

| Setting                      | What it controls                                                                                                                                                                                              |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Model                        | The AI model TestVibe uses for feature drafting and Playwright code generation. TestVibe currently offers a single first-party model, so there is nothing to pick — the field simply names it.                |
| Reasoning effort             | Low, Medium, or High. Higher effort produces more thorough tests but uses more credits and takes longer.                                                                                                      |
| Generation timeout (minutes) | The maximum time one generation may run before TestVibe stops it and marks the feature failed rather than shipping an unfinished test. Empty uses the 60-minute default; values are clamped to 5–120 minutes. |

New projects default to **Medium** reasoning effort and the 60-minute generation timeout.

Tests generate with the **TestVibe Assistant** — reasoning effort maps to the underlying provider's effort setting. Self-hosted installs configured with a custom OpenAI-compatible endpoint see their own model list here instead; see [AI models (self-hosted)](/self-hosting/ai-models.md) if that applies to your install.

A generated test only reaches **generated** status after TestVibe replays the whole assembled spec end-to-end and it passes — this validation always runs and cannot be turned off.

## When To Keep Defaults

Keep the defaults when:

* you are doing the quickstart
* your team already configured the project
* generation is producing acceptable output
* you want consistent results across the team

## When To Change

| Situation                                                        | Try                                                                                                       |
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| Output quality is weak on complex flows                          | Raise reasoning effort to High.                                                                           |
| Generation feels slow or uses too many credits for routine tests | Lower the reasoning effort.                                                                               |
| A heavy feature is hitting the generation timeout                | Raise **Generation timeout (minutes)**, up to 120. Most features finish well under the 60-minute default. |

## After Changing

Run a small generation first. Compare the output against the same expectations:

* Does it follow the Gherkin?
* Does it use the correct UI?
* Does it include real assertions?
* Does it generate code your team can review?

If the new settings work well, save them as the project default.

## Related Help

* [How AI generation works](/ai-generation/how-ai-generation-works.md)
* [Regenerate a test](/ai-generation/regenerate-test.md)
* [Credit Usage](/account-settings/credit-usage.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.testvibe.com/ai-generation/choose-agent-and-model.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
