-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy path.env.example
More file actions
876 lines (724 loc) · 35.5 KB
/
.env.example
File metadata and controls
876 lines (724 loc) · 35.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
# NeuroLink AI Toolkit - Environment Configuration
# Copy this file to .env and fill in your credentials
# =============================================================================
# ENTERPRISE PROXY CONFIGURATION (Optional)
# =============================================================================
# Corporate proxy support - automatically detected when set
# HTTPS_PROXY=http://proxy.company.com:8080
# HTTP_PROXY=http://proxy.company.com:8080
# NO_PROXY=localhost,127.0.0.1,.company.com
# For authenticated proxies:
# HTTPS_PROXY=http://username:password@proxy.company.com:8080
# HTTP_PROXY=http://username:password@proxy.company.com:8080
# =============================================================================
# OPENAI CONFIGURATION
# =============================================================================
# Required for OpenAI provider
OPENAI_API_KEY=sk-your-openai-api-key-here
# Optional: Override default model
OPENAI_MODEL=gpt-4o
# Optional: Maximum number of tools to send to OpenAI (default: 150)
# Lower values improve performance but limit tool availability
OPENAI_MAX_TOOLS=150
# =============================================================================
# AI ENHANCEMENT FEATURES (Optional)
# =============================================================================
# Model used for response quality evaluation (Lighthouse-compatible)
NEUROLINK_EVALUATION_MODEL=gemini-2.5-flash
# =============================================================================
# NEUROLINK EVALUATION SYSTEM (Enhanced Multi-Provider Support)
# =============================================================================
# Primary Evaluation Configuration
NEUROLINK_EVALUATION_PROVIDER=google-ai # Primary provider choice
NEUROLINK_EVALUATION_MODE=fast # fast|balanced|quality
# Fallback Strategy
NEUROLINK_EVALUATION_FALLBACK_ENABLED=true # Enable automatic fallbacks
NEUROLINK_EVALUATION_FALLBACK_PROVIDERS=openai,anthropic,vertex,bedrock # Comma-separated fallback order
# Performance Tuning
NEUROLINK_EVALUATION_TIMEOUT=10000 # Evaluation timeout in ms
NEUROLINK_EVALUATION_MAX_TOKENS=500 # Max tokens for evaluation response
NEUROLINK_EVALUATION_TEMPERATURE=0.1 # Low temperature for consistent scoring
# Cost Optimization
NEUROLINK_EVALUATION_PREFER_CHEAP=true # Prefer cost-effective models
NEUROLINK_EVALUATION_MAX_COST_PER_EVAL=0.01 # Max cost per evaluation in USD
# Advanced Configuration
NEUROLINK_EVALUATION_RETRY_ATTEMPTS=2 # Retry failed evaluations
NEUROLINK_EVALUATION_CACHE_ENABLED=false # Cache evaluation results (future)
# =============================================================================
# AMAZON BEDROCK CONFIGURATION
# =============================================================================
# Required AWS credentials
AWS_ACCESS_KEY_ID=your-aws-access-key-id
AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
# Optional: Required for temporary credentials
AWS_SESSION_TOKEN=your-aws-session-token-if-using-temp-credentials
# Optional: Override defaults
AWS_REGION=us-east-2
BEDROCK_MODEL_ID=anthropic.claude-3-7-sonnet-20250219-v1:0
# =============================================================================
# GOOGLE VERTEX AI CONFIGURATION (Gemini 3)
# Supports all Gemini 3 models - see model list below
# Choose ONE of the three authentication methods below
# =============================================================================
# METHOD 1: Service Account File (Recommended for Production)
# Uncomment and provide path to your service account JSON file
GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/service-account.json
# METHOD 2: Service Account JSON String (Good for Containers/Cloud)
# Uncomment and provide the full JSON content as a string
# GOOGLE_SERVICE_ACCOUNT_KEY={"type":"service_account","project_id":"your-project","private_key_id":"...","private_key":"-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n","client_email":"service-account@your-project.iam.gserviceaccount.com","client_id":"...","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token"}
# METHOD 3: Individual Environment Variables (Good for CI/CD)
# Uncomment and provide individual service account details
# GOOGLE_AUTH_CLIENT_EMAIL=service-account@your-project.iam.gserviceaccount.com
# GOOGLE_AUTH_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nYOUR_PRIVATE_KEY_HERE\n-----END PRIVATE KEY-----"
# Required for ALL Google Vertex AI authentication methods
GOOGLE_VERTEX_PROJECT=your-gcp-project-id
# Optional: Override defaults
GOOGLE_VERTEX_LOCATION=us-central1
VERTEX_MODEL_ID=claude-sonnet-4@20250514
# Gemini 3 Models (Google AI Studio / Vertex AI)
# gemini-3-flash - Fast, efficient model
# gemini-3-flash-preview - Preview version of flash
# gemini-3-flash-latest - Latest flash version
# gemini-3-pro - Most capable Gemini 3 model
# gemini-3-pro-preview - Preview version of pro
# gemini-3-pro-latest - Latest pro version
#
# Examples:
# VERTEX_MODEL_ID=gemini-3-flash # Fast, cost-effective Gemini 3
# VERTEX_MODEL_ID=gemini-3-pro # Most capable Gemini 3
# =============================================================================
# PROVIDER SELECTION AND BEHAVIOR
# =============================================================================
# Optional: Set preferred provider order
DEFAULT_PROVIDER=auto
FALLBACK_PROVIDER=openai
# Optional: Enable/disable features
ENABLE_STREAMING=true
ENABLE_FALLBACK=true
# =============================================================================
# APPLICATION SETTINGS
# =============================================================================
# Optional: Application environment and configuration
PUBLIC_APP_ENVIRONMENT=dev
PUBLIC_APP_NAME=neurolink
PUBLIC_APP_URL=http://localhost:5173
# Optional: Debug and logging
NEUROLINK_DEBUG=false
LOG_LEVEL=info
# =============================================================================
# ADVANCED CONFIGURATION (Optional)
# =============================================================================
# Port for demo server
PORT=3000
# Custom model overrides
# OPENAI_MODEL=gpt-4o-mini
# BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0
# BEDROCK_MODEL_ID=anthropic.claude-3-haiku-20240307-v1:0
# VERTEX_MODEL_ID=claude-opus-4@20250514
# VERTEX_MODEL_ID=gemini-2.5-flash
# Rate limiting and performance
# MAX_RETRIES=3
# TIMEOUT_MS=30000
# RATE_LIMIT_RPM=60
# =============================================================================
# AUTHENTICATION EXAMPLES
# =============================================================================
# Example 1: OpenAI Only
# OPENAI_API_KEY=sk-proj-abc123...
# DEFAULT_PROVIDER=openai
# Example 2: AWS Bedrock with IAM User
# AWS_ACCESS_KEY_ID=your-aws-access-key-id
# AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
# AWS_REGION=us-east-1
# DEFAULT_PROVIDER=bedrock
# Example 3: Google Vertex AI with Service Account File
# GOOGLE_APPLICATION_CREDENTIALS=/home/user/gcp-service-account.json
# GOOGLE_VERTEX_PROJECT=my-ai-project-123456
# DEFAULT_PROVIDER=vertex
# Example 4: LiteLLM for 100+ Models via Proxy
# LITELLM_BASE_URL=http://localhost:4000
# LITELLM_API_KEY=sk-anything
# LITELLM_MODEL=openai/gpt-4o-mini
# DEFAULT_PROVIDER=litellm
# Example 5: SageMaker Custom Model Deployment
# AWS_ACCESS_KEY_ID=your-aws-access-key-id
# AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
# AWS_REGION=us-east-1
# SAGEMAKER_DEFAULT_ENDPOINT=my-custom-model-endpoint
# DEFAULT_PROVIDER=sagemaker
# Example 6: All Providers with Fallback Chain
# OPENAI_API_KEY=sk-proj-abc123...
# AWS_ACCESS_KEY_ID=your-aws-access-key-id
# AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
# GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
# GOOGLE_VERTEX_PROJECT=my-project
# LITELLM_BASE_URL=http://localhost:4000
# LITELLM_API_KEY=sk-anything
# SAGEMAKER_DEFAULT_ENDPOINT=my-custom-model
# DEFAULT_PROVIDER=bedrock
# FALLBACK_PROVIDER=openai
# ENABLE_FALLBACK=true
# =============================================================================
# TROUBLESHOOTING TIPS
# =============================================================================
# 1. For AWS "not authorized" errors: Check Bedrock/SageMaker access in your region
# 2. For Google auth errors: Verify service account permissions
# 3. For OpenAI rate limits: Check your API tier and usage
# 4. For LiteLLM proxy errors: Ensure proxy server is running on specified port
# 5. For SageMaker endpoint errors: Verify endpoint exists and is "InService"
# 6. Enable NEUROLINK_DEBUG=true for detailed logging
# 7. Check the README.md for comprehensive setup instructions
# =============================================================================
# GOOGLE AI STUDIO CONFIGURATION (UPDATED 2025-01-03)
# =============================================================================
# Required for Google AI Studio provider (free Google AI)
GOOGLE_AI_API_KEY=your-google-ai-studio-api-key
# or alternative name
GOOGLE_GENERATIVE_AI_API_KEY=your-google-ai-studio-api-key
# Recommended models (UPDATED):
GOOGLE_AI_MODEL=gemini-2.5-pro # ✅ Recommended for most tasks
# GOOGLE_AI_MODEL=gemini-pro-vision # ✅ For multimodal (text + images)
# ⚠️ AVOID these deprecated models:
# GOOGLE_AI_MODEL=gemini-2.5-pro-preview-05-06 # ❌ Causes empty responses
# GOOGLE_AI_MODEL=gemini-pro # ❌ May be deprecated
# Enhancement Features (OPTIONAL)
# These control default behavior - can be overridden per request
NEUROLINK_ENABLE_ANALYTICS=false # Enable analytics by default
NEUROLINK_ENABLE_EVALUATION=false # Enable evaluation by default
# =============================================================================
# HUGGING FACE CONFIGURATION
# =============================================================================
# Required for Hugging Face provider
HUGGINGFACE_API_KEY=hf_your-hugging-face-api-key-here
# or alternative name
HF_TOKEN=hf_your-hugging-face-api-key-here
# Optional: Override default model
HUGGINGFACE_MODEL=microsoft/DialoGPT-large
# =============================================================================
# OLLAMA LOCAL AI CONFIGURATION
# =============================================================================
# Ollama requires local installation and running service
# Download from: https://ollama.ai
# Optional: Override default base URL (if running on different host/port)
OLLAMA_BASE_URL=http://localhost:11434
# Optional: Override default model
OLLAMA_MODEL=llama3.2:latest
# Optional: Override request timeout (default 60 seconds)
OLLAMA_TIMEOUT=60000
# =============================================================================
# MISTRAL AI CONFIGURATION
# =============================================================================
# Required for Mistral AI provider (European GDPR-compliant AI)
MISTRAL_API_KEY=your-mistral-api-key-here
# Optional: Override default model
MISTRAL_MODEL=mistral-small
# Available models:
# - mistral-tiny (fastest, most cost-effective)
# - mistral-small (balanced performance, default)
# - mistral-medium (enhanced capabilities)
# - mistral-large (most capable model)
# Optional: Override default endpoint
MISTRAL_ENDPOINT=https://api.mistral.ai
# =============================================================================
# OPENAI COMPATIBLE CONFIGURATION
# =============================================================================
# Required for OpenAI-compatible providers (vLLM, etc.)
OPENAI_COMPATIBLE_BASE_URL=https://api.example.com/v1
OPENAI_COMPATIBLE_API_KEY=your-api-key-here
# Optional: Override default model (will auto-discover if not specified)
OPENAI_COMPATIBLE_MODEL=gpt-4o-mini
# Example configurations:
# vLLM: http://localhost:8000/v1
# LiteLLM proxy: http://localhost:4000/v1
# =============================================================================
# OPENROUTER CONFIGURATION (300+ AI Models from 60+ Providers)
# =============================================================================
# OpenRouter provides unified access to 300+ AI models from 60+ providers
# through a single API with automatic fallbacks and intelligent routing.
# Get your API key at: https://openrouter.ai/keys
# Required: Your OpenRouter API key
OPENROUTER_API_KEY=sk-or-v1-your-api-key-here
# Optional: Default model (format: provider/model-name)
OPENROUTER_MODEL=anthropic/claude-3-5-sonnet
# Popular model options:
# - anthropic/claude-3-5-sonnet (recommended for complex tasks)
# - anthropic/claude-3-5-haiku (fast and cost-effective)
# - openai/gpt-4o (OpenAI's latest)
# - openai/gpt-4o-mini (fast and cheap)
# - google/gemini-2.0-flash (Google's multimodal)
# - meta-llama/llama-3.1-70b-instruct (open source)
# - mistralai/mistral-large (European GDPR-compliant)
# Browse all models: https://openrouter.ai/models
# Optional: Attribution headers for OpenRouter dashboard
OPENROUTER_REFERER=https://yourapp.com
OPENROUTER_APP_NAME=YourAppName
# Optional: Request timeout in milliseconds (default: 60000)
OPENROUTER_TIMEOUT=60000
# =============================================================================
# LITELLM CONFIGURATION (100+ AI Models via Proxy)
# =============================================================================
# LiteLLM provides unified access to 100+ AI models through a proxy server
# Start local proxy: pip install litellm && litellm --port 4000
# Required: LiteLLM proxy server URL
LITELLM_BASE_URL=http://localhost:4000
# Required: API key for proxy (any value works for local proxy)
LITELLM_API_KEY=sk-anything
# Optional: Default model to use
LITELLM_MODEL=openai/gpt-4o-mini
# Optional: Request timeout (default 60 seconds)
LITELLM_TIMEOUT=60000
# Available model formats (examples):
# OpenAI: openai/gpt-4o, openai/gpt-4o-mini
# Anthropic: anthropic/claude-3-5-sonnet, anthropic/claude-3-haiku
# Google: google/gemini-2.0-flash, vertex_ai/gemini-pro
# Mistral: mistral/mistral-large, mistral/mixtral-8x7b
# =============================================================================
# AMAZON SAGEMAKER CONFIGURATION (Custom Model Deployment)
# =============================================================================
# Amazon SageMaker allows you to deploy and use your own custom trained models
# Required: AWS credentials (same as Bedrock)
# AWS_ACCESS_KEY_ID=your-aws-access-key-id
# AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
# AWS_REGION=us-east-1
# Required: Your SageMaker endpoint name
SAGEMAKER_DEFAULT_ENDPOINT=your-sagemaker-endpoint-name
# Optional: Timeout and retry settings
SAGEMAKER_TIMEOUT=30000 # Request timeout in milliseconds (default 30s)
SAGEMAKER_MAX_RETRIES=3 # Number of retry attempts (default 3)
# Optional: Model-specific settings
SAGEMAKER_MODEL=custom-model-name # Model identifier for logging
SAGEMAKER_CONTENT_TYPE=application/json # Request content type
SAGEMAKER_ACCEPT=application/json # Response content type
# Optional: Session token for temporary credentials (IAM roles)
# AWS_SESSION_TOKEN=your-session-token
# =============================================================================
# IMAGE CACHE CONFIGURATION (Optional)
# =============================================================================
# Image caching reduces bandwidth usage by caching downloaded images from URLs
# Uses LRU (Least Recently Used) eviction strategy with TTL expiration
# Addresses IMG-026: No Caching issue - prevents redundant downloads
# Enable/disable image caching (default: false)
# When enabled, images downloaded from URLs are cached to avoid re-downloading
NEUROLINK_IMAGE_CACHE_ENABLED=false
# Maximum number of cached images (default: 100, min: 1, max: 1000)
# When cache is full, least recently used entries are evicted
NEUROLINK_IMAGE_CACHE_SIZE=100
# Time-to-live for cached images in milliseconds (default: 1800000 = 30 minutes)
# Min: 1000 (1 second), Max: 86400000 (24 hours)
# Entries older than TTL are automatically expired
NEUROLINK_IMAGE_CACHE_TTL_MS=1800000
# Maximum size per image in bytes (default: 10485760 = 10MB)
# Min: 1024 (1KB), Max: 104857600 (100MB)
# Images exceeding this size are not cached
NEUROLINK_IMAGE_MAX_SIZE=10485760
# Cache Features:
# ✅ LRU eviction when cache is full (least recently accessed removed first)
# ✅ Automatic TTL-based expiration (old entries cleaned up)
# ✅ Content hash deduplication (same image from different URLs cached once)
# ✅ URL normalization (removes tracking parameters like utm_source, fbclid)
# ✅ Cache hit/miss statistics tracking
# ✅ Rate limiting bypass for cached images (improves performance)
# Performance Impact:
# - Cache hits: ~1ms (no network request)
# - Cache misses: ~2-10s (network download + rate limiting)
# - Typical hit rate: 40-60% for repeated image URLs
# Example configurations:
# NEUROLINK_IMAGE_CACHE_ENABLED=false # Disable caching entirely (testing)
# NEUROLINK_IMAGE_CACHE_SIZE=200 # Cache up to 200 images (high volume)
# NEUROLINK_IMAGE_CACHE_TTL_MS=3600000 # 1 hour TTL (longer retention)
# NEUROLINK_IMAGE_MAX_SIZE=5242880 # 5MB max per image (smaller limit)
# =============================================================================
# CONVERSATION TITLE GENERATION (Optional)
# =============================================================================
# Customize the prompt used to generate conversation titles from user messages.
# Use ${userMessage} placeholder to include the user's message in the prompt.
# If not set, uses default prompt optimized for 20-character titles.
#
NEUROLINK_TITLE_PROMPT='Create a short 3-word title for: ${userMessage}'
#
# =============================================================================
# CONVERSATION MEMORY CONFIGURATION (Optional)
# =============================================================================
# Enable conversation memory feature (ENABLED BY DEFAULT)
NEUROLINK_MEMORY_ENABLED=true # Enable conversation memory (default: true)
# Memory storage type (memory or redis)
STORAGE_TYPE=memory # Options: memory, redis
# Memory limits
NEUROLINK_MEMORY_MAX_SESSIONS=50 # Maximum number of sessions to keep in memory
# Redis Storage Configuration (used when STORAGE_TYPE=redis)
REDIS_HOST=localhost # Redis server hostname
REDIS_PORT=6379 # Redis server port
REDIS_PASSWORD= # Redis password (if required)
REDIS_DB=0 # Redis database number
REDIS_KEY_PREFIX=neurolink:conversation: # Key prefix for Redis
REDIS_TTL=86400 # TTL in seconds (24 hours)
# Redis Connection Options
REDIS_CONNECT_TIMEOUT=30000 # Connection timeout in ms
REDIS_MAX_RETRIES=3 # Maximum connection retry attempts
REDIS_RETRY_DELAY=100 # Retry delay in ms
# Storage Notes:
# - Memory storage: Fast access, no persistence between restarts
# - Redis storage: Persistent storage, survives restarts, supports clustering
# =============================================================================
# HIPPOCAMPUS MEMORY ENGINE (Embedded SDK)
# =============================================================================
# HC_CONDENSATION_PROMPT= # Custom condensation prompt (placeholders: {{OLD_MEMORY}}, {{NEW_CONTENT}}, {{MAX_WORDS}})
# HC_LOG_LEVEL=warn # Memory SDK log level (debug, info, warn, error)
# =============================================================================
# ANTHROPIC CLAUDE CONFIGURATION
# =============================================================================
# Required for Anthropic Claude provider
ANTHROPIC_API_KEY=sk-ant-your-anthropic-api-key-here
# Optional: Override default model
ANTHROPIC_MODEL=claude-3-5-sonnet-20241022
# Available models:
# - claude-3-5-sonnet-20241022 (Latest and most capable)
# - claude-3-5-haiku-20241022 (Fast and cost-effective)
# - claude-3-opus-20240229 (Most powerful, slower)
# - claude-3-sonnet-20240229 (Balanced performance)
# - claude-3-haiku-20240307 (Fast and economical)
# =============================================================================
# AZURE OPENAI CONFIGURATION
# =============================================================================
# Required for Azure OpenAI provider
AZURE_OPENAI_API_KEY=your-azure-openai-32-char-hex-key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
# Optional: Override default deployment/model
AZURE_OPENAI_MODEL=gpt-4o
# Available deployments (depends on your Azure setup):
# - gpt-4o (Latest GPT-4 Omni model)
# - gpt-4o-mini (Faster, cost-effective GPT-4 Omni)
# - gpt-4-turbo (GPT-4 Turbo)
# - gpt-35-turbo (GPT-3.5 Turbo)
# - text-embedding-ada-002 (For embeddings)
# Note: Azure OpenAI uses deployment names, not model names
# Create deployments in Azure OpenAI Studio first
# =============================================================================
# PERFORMANCE TUNING (Optional)
# =============================================================================
# Duration in milliseconds to cache the list of available tools
NEUROLINK_TOOL_CACHE_DURATION=20000
# =============================================================================
# NEUROLINK - MCP TOOLING (Optional)
# =============================================================================
# Disable MCP tools entirely if needed
NEUROLINK_DISABLE_MCP_TOOLS=false
# Maximum number of tools per provider (for performance)
NEUROLINK_MAX_TOOLS_PER_PROVIDER=5
# =============================================================================
# NEUROLINK ADVANCED CONFIGURATION (Optional)
# =============================================================================
# Config File Location
NEUROLINK_CONFIG_FILE=./neurolink.config.json
# Summarization (Conversation Memory) - TOKEN-BASED MEMORY ENABLED BY DEFAULT
# Token-based memory is enabled by default and uses 80% of each model's context window
NEUROLINK_SUMMARIZATION_ENABLED=true # Enable summarization (default: true)
NEUROLINK_TOKEN_THRESHOLD=50000 # Optional: Override token threshold (default: 80% of model context)
NEUROLINK_SUMMARIZATION_PROVIDER=vertex # Provider for summarization (default: vertex)
NEUROLINK_SUMMARIZATION_MODEL=gemini-2.5-flash # Model for summarization (default: gemini-2.5-flash)
# Deprecated: Turn-based memory settings (use TOKEN_THRESHOLD instead)
# NEUROLINK_SUMMARIZATION_THRESHOLD_TURNS=20 # Deprecated: Use token threshold
# NEUROLINK_SUMMARIZATION_TARGET_TURNS=10 # Deprecated: Use token threshold
# Default Generation Parameters
NEUROLINK_DEFAULT_MAX_TOKENS=4096
NEUROLINK_DEFAULT_TEMPERATURE=0.7
# Tool Configuration
NEUROLINK_TOOL_DESCRIPTION_MAX_LENGTH=1024
NEUROLINK_TOOL_NAME_MAX_LENGTH=64
NEUROLINK_DISABLE_DIRECT_TOOLS=false
NEUROLINK_DISABLE_BUILTIN_TOOLS=false
NEUROLINK_DISABLE_CUSTOM_TOOLS=false
# Evaluation Configuration
NEUROLINK_RAGAS_EVALUATION_MODEL=gemini-2.5-flash
NEUROLINK_RAGAS_EVALUATION_PROVIDER=google-ai
NEUROLINK_EVALUATION_THRESHOLD=7.0
# Context Processing
NEUROLINK_CONTEXT_EXCLUDE_FIELDS=password,secret,token
NEUROLINK_CONTEXT_INCLUDE_FIELDS=
NEUROLINK_CONTEXT_OVERRIDE_FIELDS=
# Factory & Caching
NEUROLINK_FACTORY_CACHE_SIZE=100
NEUROLINK_LOG_LEVEL=info
# Telemetry
NEUROLINK_TELEMETRY_ENABLED=false
# =============================================================================
# PROVIDER PERFORMANCE RATINGS (Optional - Advanced)
# =============================================================================
# Override default cost and performance ratings for providers
# Used for automatic provider selection and cost optimization
# Google AI Studio
GOOGLE_AI_DEFAULT_INPUT_COST=0.00001
GOOGLE_AI_DEFAULT_OUTPUT_COST=0.00003
GOOGLE_AI_SPEED_RATING=9
GOOGLE_AI_QUALITY_RATING=8
GOOGLE_AI_COST_RATING=10
# Google Vertex AI
GOOGLE_VERTEX_DEFAULT_INPUT_COST=0.000125
GOOGLE_VERTEX_DEFAULT_OUTPUT_COST=0.000375
GOOGLE_VERTEX_SPEED_RATING=9
GOOGLE_VERTEX_QUALITY_RATING=9
GOOGLE_VERTEX_COST_RATING=8
# OpenAI
OPENAI_DEFAULT_INPUT_COST=0.000001
OPENAI_DEFAULT_OUTPUT_COST=0.000002
OPENAI_SPEED_RATING=8
OPENAI_QUALITY_RATING=9
OPENAI_COST_RATING=7
# Anthropic
ANTHROPIC_DEFAULT_INPUT_COST=0.000003
ANTHROPIC_DEFAULT_OUTPUT_COST=0.000015
ANTHROPIC_SPEED_RATING=7
ANTHROPIC_QUALITY_RATING=10
ANTHROPIC_COST_RATING=6
# Vertex (Anthropic on Vertex)
VERTEX_DEFAULT_INPUT_COST=0.000003
VERTEX_DEFAULT_OUTPUT_COST=0.000015
VERTEX_SPEED_RATING=7
VERTEX_QUALITY_RATING=10
VERTEX_COST_RATING=7
# AWS Bedrock
BEDROCK_DEFAULT_INPUT_COST=0.000003
BEDROCK_DEFAULT_OUTPUT_COST=0.000015
BEDROCK_SPEED_RATING=7
BEDROCK_QUALITY_RATING=9
BEDROCK_COST_RATING=7
# Azure OpenAI
AZURE_DEFAULT_INPUT_COST=0.000001
AZURE_DEFAULT_OUTPUT_COST=0.000002
AZURE_SPEED_RATING=8
AZURE_QUALITY_RATING=9
AZURE_COST_RATING=7
# Ollama (Local)
OLLAMA_DEFAULT_INPUT_COST=0
OLLAMA_DEFAULT_OUTPUT_COST=0
OLLAMA_SPEED_RATING=6
OLLAMA_QUALITY_RATING=6
OLLAMA_COST_RATING=10
# Hugging Face
HUGGINGFACE_DEFAULT_INPUT_COST=0.00001
HUGGINGFACE_DEFAULT_OUTPUT_COST=0.00003
HUGGINGFACE_SPEED_RATING=5
HUGGINGFACE_QUALITY_RATING=6
HUGGINGFACE_COST_RATING=9
# Mistral AI
MISTRAL_DEFAULT_INPUT_COST=0.000001
MISTRAL_DEFAULT_OUTPUT_COST=0.000003
MISTRAL_SPEED_RATING=8
MISTRAL_QUALITY_RATING=8
MISTRAL_COST_RATING=9
# =============================================================================
# DYNAMIC MODEL CONFIGURATION (Optional)
# =============================================================================
MODEL_CONFIG_URL=https://your-server.com/models.json
MODEL_CONFIG_GITHUB_REPO=owner/repo
MODEL_CONFIG_GITHUB_BRANCH=main
MODEL_SERVER_PORT=3001
# =============================================================================
# ADDITIONAL PROVIDER CONFIGURATIONS (Optional)
# =============================================================================
# Azure OpenAI Deployments
AZURE_OPENAI_DEPLOYMENT=gpt-4o-deployment-name
AZURE_OPENAI_DEPLOYMENT_ID=your-deployment-id
AZURE_API_VERSION=2024-02-15-preview
AZURE_MODEL=gpt-4o
# Google Cloud Extended
GOOGLE_VOICE_AI_MODEL=gemini-2.0-flash-thinking-exp-01-21
GOOGLE_CLOUD_LOCATION=us-central1
VERTEX_LOCATION=us-central1
GOOGLE_CLOUD_PROJECT_ID=your-project-id
GOOGLE_PROJECT_ID=your-project-id
GOOGLE_CLOUD_PROJECT=your-project-id
GCLOUD_PROJECT=your-project-id
# AWS Extended
AWS_PROFILE=default
AWS_DEFAULT_REGION=us-east-1
BEDROCK_ENDPOINT_URL=https://bedrock-runtime.us-east-1.amazonaws.com
BEDROCK_MODEL=anthropic.claude-3-5-sonnet-20241022-v2:0
# Vertex Model Override
VERTEX_MODEL=claude-3-5-sonnet@20241022
VERTEX_PROJECT_ID=your-gcp-project-id
# =============================================================================
# GOOGLE VERTEX AI - ALTERNATIVE AUTH METHODS (Optional)
# =============================================================================
# For environments where service account file is not available
# Individual Auth Components
GOOGLE_AUTH_TYPE=service_account
GOOGLE_AUTH_BREEZE_PROJECT_ID=your-project-id
GOOGLE_AUTH_CLIENT_ID=123456789012345678901
GOOGLE_AUTH_CLIENT_EMAIL=service-account@your-project.iam.gserviceaccount.com
GOOGLE_AUTH_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
GOOGLE_AUTH_AUTH_URI=https://accounts.google.com/o/oauth2/auth
GOOGLE_AUTH_TOKEN_URI=https://oauth2.googleapis.com/token
GOOGLE_AUTH_AUTH_PROVIDER_CERT_URL=https://www.googleapis.com/oauth2/v1/certs
GOOGLE_AUTH_CLIENT_CERT_URL=https://www.googleapis.com/robot/v1/metadata/x509/service-account%40project.iam.gserviceaccount.com
GOOGLE_AUTH_UNIVERSE_DOMAIN=googleapis.com
# Alternative API Key Names
GEMINI_API_KEY=your-api-key-here # Alternative to GOOGLE_AI_API_KEY
# =============================================================================
# SAGEMAKER EXTENDED CONFIGURATION (Optional)
# =============================================================================
# Endpoint Selection
SAGEMAKER_REGION=us-east-1
SAGEMAKER_ENDPOINT=your-endpoint-name
SAGEMAKER_ENDPOINT_NAME=your-endpoint-name
SAGEMAKER_MODEL_NAME=your-model-name
SAGEMAKER_MODEL_TYPE=huggingface # Model type hint
# Multi-Environment Endpoints
SAGEMAKER_PRODUCTION_ENDPOINT=prod-endpoint
SAGEMAKER_TEST_ENDPOINT=test-endpoint
# Request Configuration
SAGEMAKER_CUSTOM_ATTRIBUTES={}
SAGEMAKER_INPUT_FORMAT=json
SAGEMAKER_OUTPUT_FORMAT=json
SAGEMAKER_MAX_TOKENS=2048
SAGEMAKER_TEMPERATURE=0.7
SAGEMAKER_TOP_P=0.9
SAGEMAKER_STOP_SEQUENCES=["\\n\\nHuman:"]
# Streaming Configuration
SAGEMAKER_BASE_STREAMING_DELAY_MS=50
SAGEMAKER_MAX_STREAMING_DELAY_MS=200
# =============================================================================
# MULTI-ENVIRONMENT AWS CREDENTIALS (Optional)
# =============================================================================
# For managing multiple AWS environments
# Development
DEV_AWS_ACCESS_KEY_ID=your-dev-aws-access-key-id
DEV_AWS_SECRET_ACCESS_KEY=your-dev-aws-secret-access-key
# Staging
STAGING_AWS_ACCESS_KEY_ID=your-staging-aws-access-key-id
STAGING_AWS_SECRET_ACCESS_KEY=your-staging-aws-secret-access-key
# Production
PROD_AWS_ACCESS_KEY_ID=your-prod-aws-access-key-id
PROD_AWS_SECRET_ACCESS_KEY=your-prod-aws-secret-access-key
PROD_AWS_REGION=us-east-1
PROD_SAGEMAKER_ENDPOINT=prod-endpoint-name
# =============================================================================
# EXTERNAL SERVICE INTEGRATIONS (Optional)
# =============================================================================
# Bitbucket
BITBUCKET_USERNAME=your-username
BITBUCKET_TOKEN=your-app-password
BITBUCKET_BASE_URL=https://api.bitbucket.org/2.0
# Slack
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_SIGNING_SECRET=your-signing-secret
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/neurolink
# =============================================================================
# EXTENDED PROXY CONFIGURATION (Optional)
# =============================================================================
ALL_PROXY=socks5://proxy.company.com:1080
SOCKS_PROXY=socks5://proxy.company.com:1080
# =============================================================================
# OPENTELEMETRY CONFIGURATION (Optional)
# =============================================================================
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
OTEL_SERVICE_NAME=neurolink
OTEL_SERVICE_VERSION=7.48.1
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4318/v1/traces
# =============================================================================
# LITELLM EXTENDED (Optional)
# =============================================================================
LITELLM_FALLBACK_MODELS=openai/gpt-4o-mini,anthropic/claude-3-haiku
PROVIDER=litellm # Override default provider
# =============================================================================
# ADVANCED PROVIDER SETTINGS (Optional)
# =============================================================================
PROVIDER_FAILURE_THRESHOLD=3 # Failed requests before circuit breaker
OLLAMA_API_BASE=http://localhost:11434 # Alternative to OLLAMA_BASE_URL
# =============================================================================
# TESTING & DEVELOPMENT (Optional)
# =============================================================================
NEUROLINK_PACKAGE=@juspay/neurolink # Package identifier
PROMPT_TYPE=default # Prompt template type
# =============================================================================
# OBSERVABILITY & ANALYTICS
# =============================================================================
# Langfuse Configuration
# Sign up at: https://cloud.langfuse.com or self-host
LANGFUSE_PUBLIC_KEY=pk-lf-your-public-key-here
LANGFUSE_SECRET_KEY=sk-lf-your-secret-key-here
LANGFUSE_BASE_URL=https://cloud.langfuse.com
LANGFUSE_ENABLED=false
# OpenTelemetry Configuration (Optional)
# Telemetry is automatically enabled when OTEL_EXPORTER_OTLP_ENDPOINT is set
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
# OTEL_SERVICE_NAME=neurolink-ai
# =============================================================================
# REAL-TIME VOICE SERVER (voice-server command)
# =============================================================================
# Cartesia TTS — https://cartesia.ai
CARTESIA_API_KEY=
# Optional: API version pin used in Cartesia WS query params
CARTESIA_API_VERSION=2025-04-16
# Optional: override if Cartesia provides a different WS endpoint for your account/region
CARTESIA_WS_BASE_URL=wss://api.cartesia.ai/tts/websocket
# Soniox STT — https://soniox.com
SONIOX_API_KEY=
# Optional: override Soniox streaming WS endpoint
SONIOX_WS_URL=wss://stt-rt.soniox.com/transcribe-websocket
# Picovoice Cobra VAD — https://picovoice.ai
PICOVOICE_ACCESS_KEY=
# Optional: override LLM provider and model used by the voice pipeline
VOICE_LLM_MODEL=gpt-4o-automatic
VOICE_LLM_PROVIDER=azure
# =============================================================================
# DEEPSEEK CONFIGURATION
# =============================================================================
# Get an API key at https://platform.deepseek.com/api_keys
DEEPSEEK_API_KEY=
# Optional: override default model (deepseek-chat | deepseek-reasoner)
DEEPSEEK_MODEL=deepseek-chat
# Optional: override default base URL
# DEEPSEEK_BASE_URL=https://api.deepseek.com
# =============================================================================
# NVIDIA NIM CONFIGURATION
# =============================================================================
# Get an API key at https://build.nvidia.com/settings/api-keys
NVIDIA_NIM_API_KEY=
# Optional: override default model (browse https://build.nvidia.com/models)
NVIDIA_NIM_MODEL=meta/llama-3.3-70b-instruct
# Optional: override default base URL (use for self-hosted NIM)
# NVIDIA_NIM_BASE_URL=https://integrate.api.nvidia.com/v1
# Optional NIM extras (rarely needed, leave commented)
# NVIDIA_NIM_TOP_K=
# NVIDIA_NIM_MIN_P=
# NVIDIA_NIM_REPETITION_PENALTY=
# NVIDIA_NIM_MIN_TOKENS=
# NVIDIA_NIM_CHAT_TEMPLATE=
# =============================================================================
# LM STUDIO CONFIGURATION (local provider)
# =============================================================================
# Install LM Studio: https://lmstudio.ai/
# Load a model in the app and click "Start Server"
LM_STUDIO_BASE_URL=http://localhost:1234/v1
# Optional: explicit model id (blank = auto-discover from /v1/models)
LM_STUDIO_MODEL=
# Optional: API key (not required for stock LM Studio; use only when running
# behind an auth-proxying reverse-proxy)
# LM_STUDIO_API_KEY=
# =============================================================================
# LLAMA.CPP CONFIGURATION (local provider)
# =============================================================================
# Run: ./llama-server -m model.gguf --port 8080 (add --jinja for tool support)
LLAMACPP_BASE_URL=http://localhost:8080/v1
# Optional: explicit model id (blank = use whatever model llama-server has loaded)
LLAMACPP_MODEL=
# Optional: API key (not required for stock llama-server; use only when running
# behind an auth-proxying reverse-proxy)
# LLAMACPP_API_KEY=
# =============================================================================
# VOICE PROVIDER CREDENTIALS (TTS / STT / Realtime)
# =============================================================================
# ElevenLabs TTS (https://elevenlabs.io)
ELEVENLABS_API_KEY=
# Deepgram STT (https://deepgram.com)
DEEPGRAM_API_KEY=
# Azure Cognitive Services Speech (TTS + STT)
# Get from: Azure Portal → Cognitive Services → Speech → Keys and Endpoint
AZURE_SPEECH_KEY=
AZURE_SPEECH_REGION=eastus
# Google STT + Gemini Live realtime voice
# Both providers accept GOOGLE_AI_API_KEY (defined above) or GEMINI_API_KEY as
# aliases — no need to set a separate GOOGLE_API_KEY. For service-account auth
# with Google STT, set GOOGLE_APPLICATION_CREDENTIALS instead.