Skip to main content
Freesona supports seven built-in AI providers and custom OpenAI-compatible endpoints. The shared provider interface works with the same commands. Set a provider at startup with environment variables, or switch one of the built-in providers at runtime without restarting the bot.

Supported Providers

Setting the Provider at Startup

Set AI_PROVIDER in your .env file to the provider value from the table above. Then add the matching credentials. Set MODEL_NAME (or AI_PROVIDER_MODEL) to specify the default model for that provider.

Switching Providers at Runtime

Change the active provider from Discord without editing .env or restarting. All provider commands are restricted to the Bot Owner. The <name> argument accepts the built-in provider values: gemini, openai, ollama, nim, azure, groq, or openrouter. Configure the custom endpoint at startup with AI_PROVIDER=custom and CUSTOM_API_BASE_URL.

Switching Models at Runtime

Override the active model independently of the provider, also without a restart.
Use /model set to test different models on the same provider before committing a choice to your .env file. Use /model reset to snap back to your default after experimenting.

Multimodal Input

Attach files to any AI command or conversation channel message. The bot reads them alongside your text prompt. Supported file types include:
  • Images: PNG, JPEG, WEBP, GIF, HEIC, HEIF
  • Documents: PDF, plain text, Markdown, CSV, HTML, RTF, XML
  • Code: JavaScript, Python
  • Audio: MP3, WAV, AAC, OGG, FLAC, AIFF
  • Video: MP4, MOV, AVI, WEBM, WMV, 3GPP, MPEG
Multimodal input is fully supported on Gemini. Non-Gemini providers receive text-only input. Attached files are silently ignored on providers that do not support multimodal processing.

Notes on Specific Providers

Gemini is the default provider. All providers, including Gemini, are now stateless — conversation context is injected through the system prompt via ConversationManager. This means every provider receives the same conversation history regardless of its native capabilities.
Ollama runs entirely on your own machine. No API key is required. Set OLLAMA_BASE_URL to the address where your Ollama server is listening (default: http://localhost:11434/api/chat). Set AI_PROVIDER_MODEL to the name of a model you have already pulled locally.
Set OPENROUTER_SITE_URL and OPENROUTER_SITE_NAME in your .env to send attribution headers with each request. OpenRouter uses these to identify your application in usage dashboards and to comply with certain model provider policies.
Set EMBEDDING_MODEL in your .env to change the sentence transformer model used for ChromaDB vector embeddings. The default is all-MiniLM-L6-v2 (384 dimensions, fast, good quality). Other options include all-mpnet-base-v2 (768 dimensions, higher quality, slower) or any other model from the Sentence Transformers library.