Configure AI Provider
Introduction
EvoLayer Base uses the official laravel/ai SDK to power advanced capabilities like structured-output streaming, text and image generation, RAG/embeddings, and tool-calling. While it defaults to Gemini out of the box, it seamlessly supports a vast ecosystem of providers including OpenAI, Anthropic, DeepSeek, Groq, xAI, Mistral, and local models via Ollama. To enable these features, simply add your preferred provider's API key.
Step 1 — Adding Your API Key
Open your .env file and add the API key for your chosen provider.
# For Gemini (Default)
GEMINI_API_KEY="your-api-key-here"
# For OpenAI
OPENAI_API_KEY="your-api-key-here"Step 2 — Verifying the Provider
Use the stream-check Artisan command to verify that your provider supports structured-output streaming correctly end-to-end.
php artisan evolayer:ai:stream-check geminiIf successful, you will see a stream of tokens followed by a correctly parsed JSON object.
Anthropic currently does not support the exact streaming schema required for runtime use in ThreadStudio. It is diagnostic-eligible but blocked for ThreadStudio runtime pending re-verification from the laravel/ai upstream.
Was this page helpful?