Skip to content

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 your PATH.

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 the fault binary to pick it up.

    export GEMINI_API_KEY=...
    

    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.

    --llm-client gemini
    
  • Configure the model parameters

    The model used for reasoning. This can also be set via the LLM_PROMPT_REASONING_MODEL environment variable.

    --llm-prompt-reasoning-model gemini-2.5-flash
    

    The embedding model, default to text-embedding-3-small. This can also be set via the FAULT_AGENT_EMBED_MODEL environment variable.

    --llm-embed-model gemini-embedding-exp-03-07
    

    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 the FAULT_AGENT_EMBED_MODEL_DIMENSION environment variable.

    --llm-embed-model-dim 384
    

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 the fault binary to pick it up.

    export OPENAI_API_KEY=sk-...
    

    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.

    --llm-client open-ai
    
  • Configure the model parameters

    The model used for reasoning, default to o4-mini). This can also be set via the LLM_PROMPT_REASONING_MODEL environment variable.

    --llm-prompt-reasoning-model o4-mini
    

    The embedding model, default to text-embedding-3-small. This can also be set via the FAULT_AGENT_EMBED_MODEL environment variable.

    --llm-embed-model text-embedding-3-small
    

    The embedding model dimension, default to 1536. This can also be set via the FAULT_AGENT_EMBED_MODEL_DIMENSION environment variable.

    --llm-embed-model-dim 1536
    

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.

    --llm-client ollama
    
  • 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.

    --llm-prompt-reasoning-model gemma3:4b
    

    The embedding model. This can also be set via the FAULT_AGENT_EMBED_MODEL environment variable.

    --llm-embed-model mxbai-embed-large
    

    The embedding model dimension. This can also be set via the FAULT_AGENT_EMBED_MODEL_DIMENSION environment variable.

    --llm-embed-model-dim 1024
    

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 the fault binary to pick it up.

    export OPENROUTER_API_KEY=sk-...
    
  • Configure the client

    Enable the OpenRouter client. This can also be set via the FAULT_AGENT_CLIENT environment variable.

    --llm-client open-router
    
  • 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.

    --llm-prompt-reasoning-model google/gemma-3-27b-it
    

    The embedding model dimension. This can also be set via the FAULT_AGENT_EMBED_MODEL_DIMENSION environment variable.

    --llm-embed-model-dim 384
    

    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.