Configure fault LLM Provider
This guide will take you through configuring the LLM models for fault
Prerequisites
-
Install fault
If you haven’t installed fault yet, follow the installation instructions.
Make sure the
fault
binary can be found in yourPATH
.
Warning
This guide requires the agent feature to be enabled.
Overview
fault lets you configure your agent's models via command line parameters or environment variables.
The parameters are all set on the fault agent
command.
If you are not relying on the default setup which uses the OpenAI client, we suggest that you set the environment variables once and for all. Otherwise, your command line will get busy very quickly.
Gemini
fault supports Gemini.
-
Set an Gemini's API key
Set the
GEMINI_API_KEY
for thefault
binary to pick it up.Make sure the key is allowed to use the models you wich to use as well.
-
Configure the client
Enable the Gemini client. This can also be set via the
FAULT_AGENT_CLIENT
environment variable. -
Configure the model parameters
The model used for reasoning. This can also be set via the
LLM_PROMPT_REASONING_MODEL
environment variable.The embedding model, default to
text-embedding-3-small
. This can also be set via theFAULT_AGENT_EMBED_MODEL
environment variable.Embedding model not yet supported
Currently, the embedding model is ignored and fault uses fastembed instead. A future release will support Google's model.
The embedding model dimension, default to
384
. This can also be set via theFAULT_AGENT_EMBED_MODEL_DIMENSION
environment variable.
OpenAI
fault supports
OpenAI and is configured by
default to use it. So you, if you intend on using OpenAI, you only need to set
the OPENAI_API_KEY
environment variable.
-
Set an OpenAI's API key
Set the
OPENAI_API_KEY
for thefault
binary to pick it up.Make sure the key is allowed to use the models you wich to use as well.
-
Configure the client
Enable the OpenAI client (which is the default). This can also be set via the
FAULT_AGENT_CLIENT
environment variable. -
Configure the model parameters
The model used for reasoning, default to
o4-mini
). This can also be set via theLLM_PROMPT_REASONING_MODEL
environment variable.The embedding model, default to
text-embedding-3-small
. This can also be set via theFAULT_AGENT_EMBED_MODEL
environment variable.The embedding model dimension, default to
1536
. This can also be set via theFAULT_AGENT_EMBED_MODEL_DIMENSION
environment variable.
Ollama
fault supports ollama. This is great if you need to keep data privacy under control and/or if you have a specific home made model.
-
Configure the client
Enable the OpenAI client (which is the default). This can also be set via the
FAULT_AGENT_CLIENT
environment variable. -
Configure the model parameters
You may specify which model you want to use via the following parameters:
The model used for reasoning. This can also be set via the
LLM_PROMPT_REASONING_MODEL
environment variable.The embedding model. This can also be set via the
FAULT_AGENT_EMBED_MODEL
environment variable.The embedding model dimension. This can also be set via the
FAULT_AGENT_EMBED_MODEL_DIMENSION
environment variable.
OpenRouter
fault supports OpenRouter. This is great if you want to try many models and find the most appropriate for your needs.
-
Set an OpenRouter's API key
Set the
OPENROUTER_API_KEY
for thefault
binary to pick it up. -
Configure the client
Enable the OpenRouter client. This can also be set via the
FAULT_AGENT_CLIENT
environment variable. -
Configure the model parameters
You may specify which model you want to use via the following parameters:
The model used for reasoning. This can also be set via the
LLM_PROMPT_REASONING_MODEL
environment variable.The embedding model dimension. This can also be set via the
FAULT_AGENT_EMBED_MODEL_DIMENSION
environment variable.No explicit embedding model
OpenRouter doesn't have embedding models and thus the
--llm-embed-model
parameter is ignored. However, we set the the--llm-embed-model-dim
parameter because we use FastEmbed to workaround this issue.