Skip to main content
Freesona supports seven AI providers that all work with the same commands. Whether you use /ask, /write, /search, a conversation channel, or autonomy mode, the experience is identical regardless of which provider is active. Set your preferred provider at startup with environment variables, or switch to a different provider at any time without restarting the bot.

Supported Providers

ProviderAI_PROVIDER valueRequired environment variable(s)
Google GeminigeminiGOOGLE_API_KEY
OpenAIopenaiOPENAI_API_KEY
Ollama (local)ollamaOLLAMA_BASE_URL
NVIDIA NIMnimNVIDIA_API_KEY
Azure AI FoundryazureAZURE_AI_KEY + AZURE_AI_BASE_URL
GroqgroqGROQ_API_KEY
OpenRouteropenrouterOPENROUTER_API_KEY

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.
AI_PROVIDER=gemini
GOOGLE_API_KEY=your_gemini_api_key
MODEL_NAME=gemini-flash-lite-latest

Switching Providers at Runtime

Change the active provider from Discord without editing .env or restarting. All provider commands are restricted to the Bot Owner.
CommandWhat it does
/provider showDisplay the currently active provider
/provider set <name>Switch to a different provider immediately
/provider resetRevert to the provider value set in .env
The <name> argument accepts the same values as AI_PROVIDERgemini, openai, ollama, nim, azure, groq, or openrouter.

Switching Models at Runtime

Override the active model independently of the provider, also without a restart.
CommandWhat it does
/model showDisplay the currently active model
/model set <name>Switch to a different model name
/model resetRevert to the model defined in .env
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 and the bot will read 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 don’t support multimodal processing.

Notes on Specific Providers

Gemini is the default provider and the only one that supports server-side conversation continuity. Each user’s conversation thread is tracked via Gemini’s Interactions API using previous_interaction_id, scoped to (guild_id, channel_id, user_id) so one user’s thread never bleeds into another’s in the same channel. All other providers remain stateless and rely on the persona and long-term memory injection for context.
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) and set AI_PROVIDER_MODEL to the name of a model you’ve 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.