Skip to content

feat(ai): integrate multiple AI providers and enhance configuration options - #538

Open
narr07 wants to merge 1 commit into
nuxt-content:mainfrom
narr07:feat/ai
Open

feat(ai): integrate multiple AI providers and enhance configuration options#538
narr07 wants to merge 1 commit into
nuxt-content:mainfrom
narr07:feat/ai

Conversation

@narr07

@narr07 narr07 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR introduces support for multiple AI providers (Google Gemini and Groq) alongside the existing Vercel AI Gateway in Nuxt Studio. Users can now choose their preferred AI model provider or allow Studio to auto-detect the provider based on available environment variables.

Key Changes

  • Module Configuration: Enhanced ModuleOptions and runtimeConfig schemas to support provider-specific parameters:
    • Added provider option ('auto' | 'gateway' | 'gemini' | 'groq').
    • Added credentials and model configuration for Google Gemini (geminiApiKey, geminiModel, geminiFastModel).
    • Added credentials and model configuration for Groq (groqApiKey, groqModel, groqFastModel).
  • Dynamic Provider Utility: Added src/module/src/runtime/server/utils/ai/provider.ts to dynamically resolve and initialize the appropriate AI client depending on active environment configurations.
  • Server Routes Integration: Refactored /ai/analyze, /ai/commit, and /ai/generate server routes to leverage the unified provider utility instead of hardcoded AI Gateway client.
  • Runtime Env Synchronization: Updated the studio-env middleware to resolve and load AI credentials from runtime environment variables (GEMINI_API_KEY, NUXT_STUDIO_AI_GEMINI_API_KEY, GROQ_API_KEY, etc.).
  • Docs & Env Templates: Updated the AI documentation (docs/content/7.ai.md) and added placeholder options to .env.example files in the root and playgrounds.

How to Test

  1. Set up a Gemini API Key (GEMINI_API_KEY) or a Groq API Key (GROQ_API_KEY) in your .env.
  2. Configure ai.provider option inside nuxt.config (or leave it as auto to auto-detect).
  3. Verify that the studio actions (AI-powered content analysis, generation, and commit messages) function correctly.

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@narr07 is attempting to deploy a commit to the Nuxt Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new

pkg-pr-new Bot commented Aug 3, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/nuxt-studio@538

commit: c739e8b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant