Google Gemini
Google Gemini is NearSync's primary AI provider. It powers the platform's AI assistant (Pippin), content generation, data enrichment, intelligent column mapping for imports, and retrieval-augmented generation (RAG) with vector embeddings.
Supported Models
NearSync supports multiple Gemini models, each suited to different tasks:
| Model | Speed | Context Window | Best For |
|---|---|---|---|
| Gemini 3.1 Flash Lite | Ultra-fast | 32K tokens | Quick responses, lightweight tasks |
| Gemini 3.1 Pro Preview | Deep | 128K tokens | Complex reasoning, code generation |
| Gemini 2.0 Flash | Fast | 1M tokens | Multimodal tasks, large document processing |
| Gemini 2.5 Pro Preview | Deep | 1M tokens | Advanced reasoning |
| Gemini 1.5 Pro | Balanced | 2M tokens | Long-context analysis, large document ingestion |
The default model for most operations is Gemini 3.1 Pro Preview. Admins can change the active model in Intelligence HQ's Control Center.
Neural Routing
NearSync's AI architecture does not hard-code a single provider. Instead, the AIRouter dynamically selects the best provider and model for each request based on:
- Organization configuration -- The primary provider and model set in Intelligence HQ
- Provider availability -- If the primary provider is unreachable, the router falls back to the next configured provider
- Task requirements -- Certain features (like the import engine's column mapping) may use a specific model optimized for that task
Gemini is the default primary provider and does not require a separate API key purchase for basic usage on Managed deployments. Organizations can configure additional providers (OpenAI, Anthropic Claude, Grok, Mistral, Groq, DeepSeek, or Ollama for self-hosted) as fallbacks or alternatives through the Intelligence HQ provider gallery.
Multi-Provider Fallback
If Gemini is unavailable:
- AI chat and content generation fall back to OpenAI (if configured)
- Import column mapping falls back to a fuzzy string-matching algorithm (no AI required)
- PRD generation and data enrichment features become temporarily unavailable
Features Powered by Gemini
AI Chat (Pippin)
Pippin is NearSync's AI assistant, available across the platform. It uses the configured Gemini model to answer questions, generate content, and assist with platform tasks. Chat history and token usage are tracked in the AI Analytics dashboard.
PRD Generation
In Engineering HQ, Gemini generates Product Requirement Documents from project briefs, structuring the output with sections, acceptance criteria, and technical considerations.
Data Enrichment
The AI service can enrich CRM records by analyzing existing data and filling in gaps, such as inferring company information from email domains or suggesting industry classifications.
Import Column Mapping
When users import CSV or XLSX files through the Smart Import Engine, Gemini analyzes the uploaded column headers and maps them to the correct NearSync database fields. If Gemini is unavailable, the import engine falls back to a non-AI fuzzy matching algorithm.
Workflow AI Nodes
In automated workflows, AI nodes can process data through Gemini for tasks like summarization, classification, sentiment analysis, and content transformation.
RAG (Retrieval-Augmented Generation)
NearSync uses Gemini's embedding models to power retrieval-augmented generation for the AI assistant:
- Knowledge ingestion -- Documents and content are uploaded through Intelligence HQ's Neural Tuning tab. Each piece of content is split into chunks and embedded as 768-dimensional vectors.
- Vector storage -- Embeddings are stored in the
site_knowledgetable using PostgreSQL's pgvector extension. - Query augmentation -- When a user asks Pippin a question, the system embeds the query, performs a similarity search against the knowledge base, and includes the most relevant chunks as context in the prompt sent to Gemini.
- Response generation -- Gemini generates a response grounded in the retrieved knowledge, reducing hallucination and keeping answers specific to the organization's data.
The RAG pipeline runs through the hyper-worker edge function, which handles the embedding, vector search (via the match_site_knowledge database function), and prompt assembly.
Configuration
Intelligence HQ (Control Center)
Admins configure the AI provider in Intelligence HQ:
- Select the active provider from the provider gallery
- Choose the default model
- Monitor token usage and AI activity in the Analytics tab
- Upload knowledge base documents in the Neural Tuning tab
Credentials Required
- Gemini API key -- Required for server-side AI operations. Configured as an edge function secret for Managed deployments, or provided during BYOK setup.
- Client-side Gemini key -- Used specifically by the import engine for column mapping (runs in the browser to avoid edge function round-trips during the interactive mapping step).
For Managed deployments, NearSync provisions the Gemini API key. For BYOK deployments, you obtain your own key from Google AI Studio and provide it during setup.
If Gemini Is Unavailable
| Feature | Behavior |
|---|---|
| AI chat (Pippin) | Falls back to OpenAI if configured; otherwise unavailable |
| PRD generation | Unavailable |
| Data enrichment | Unavailable |
| Import column mapping | Falls back to fuzzy string matching |
| Workflow AI nodes | Unavailable |
| RAG queries | Unavailable (vector search still works, but generation fails) |
AI features degrade gracefully. The platform remains fully functional for all non-AI operations.