superbrain-server 1.0.48 → 1.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,73 +1,73 @@
1
- # ────────────────────────────────────────────────────────────────────────────────
2
- # Multi-stage build for optimized image size
3
- # ────────────────────────────────────────────────────────────────────────────────
4
-
5
- FROM python:3.11-slim as builder
6
-
7
- WORKDIR /app
8
-
9
- # Install system build dependencies
10
- RUN apt-get update && apt-get install -y --no-install-recommends \
11
- gcc \
12
- && rm -rf /var/lib/apt/lists/*
13
-
14
- # Copy requirements
15
- COPY requirements.txt .
16
-
17
- # Build dependencies in separate layer
18
- RUN pip install --user --no-cache-dir -r requirements.txt
19
-
20
-
21
- # ────────────────────────────────────────────────────────────────────────────────
22
- # Final production image
23
- # ────────────────────────────────────────────────────────────────────────────────
24
-
25
- FROM python:3.11-slim
26
-
27
- LABEL maintainer="SuperBrain <sidinsearch@gmail.com>"
28
- LABEL description="SuperBrain API - AI-powered content analysis and archival"
29
- LABEL version="1.0.0"
30
-
31
- WORKDIR /app
32
-
33
- # ──── Install runtime dependencies only ────
34
- RUN apt-get update && apt-get install -y --no-install-recommends \
35
- ffmpeg \
36
- libmagic1 \
37
- libgl1-mesa-glx \
38
- libglib2.0-0 \
39
- curl \
40
- && rm -rf /var/lib/apt/lists/*
41
-
42
- # ──── Copy Python dependencies from builder ────
43
- COPY --from=builder /root/.local /root/.local
44
-
45
- # ──── Set environment variables ────
46
- ENV PATH=/root/.local/bin:$PATH \
47
- PYTHONUNBUFFERED=1 \
48
- PYTHONDONTWRITEBYTECODE=1 \
49
- ENVIRONMENT=production \
50
- WORKERS=2
51
-
52
- # ──── Copy application code ────
53
- COPY . .
54
-
55
- # ──── Create necessary directories with proper permissions ────
56
- RUN mkdir -p temp config static logs data && \
57
- chmod 755 temp config static logs data
58
-
59
- # ──── Health check ────
60
- HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
61
- CMD curl -f http://localhost:5000/health || exit 1
62
-
63
- # ──── Run as non-root user for security ────
64
- RUN useradd -m -u 1000 appuser && \
65
- chown -R appuser:appuser /app
66
-
67
- USER appuser
68
-
69
- # ──── Expose port ────
70
- EXPOSE 5000
71
-
72
- # ──── Run the application ────
73
- CMD ["sh", "-c", "python -m uvicorn api:app --host 0.0.0.0 --port 5000 --workers ${WORKERS:-2} --loop uvloop --no-access-log"]
1
+ # ────────────────────────────────────────────────────────────────────────────────
2
+ # Multi-stage build for optimized image size
3
+ # ────────────────────────────────────────────────────────────────────────────────
4
+
5
+ FROM python:3.11-slim as builder
6
+
7
+ WORKDIR /app
8
+
9
+ # Install system build dependencies
10
+ RUN apt-get update && apt-get install -y --no-install-recommends \
11
+ gcc \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements
15
+ COPY requirements.txt .
16
+
17
+ # Build dependencies in separate layer
18
+ RUN pip install --user --no-cache-dir -r requirements.txt
19
+
20
+
21
+ # ────────────────────────────────────────────────────────────────────────────────
22
+ # Final production image
23
+ # ────────────────────────────────────────────────────────────────────────────────
24
+
25
+ FROM python:3.11-slim
26
+
27
+ LABEL maintainer="SuperBrain <sidinsearch@gmail.com>"
28
+ LABEL description="SuperBrain API - AI-powered content analysis and archival"
29
+ LABEL version="1.0.0"
30
+
31
+ WORKDIR /app
32
+
33
+ # ──── Install runtime dependencies only ────
34
+ RUN apt-get update && apt-get install -y --no-install-recommends \
35
+ ffmpeg \
36
+ libmagic1 \
37
+ libgl1-mesa-glx \
38
+ libglib2.0-0 \
39
+ curl \
40
+ && rm -rf /var/lib/apt/lists/*
41
+
42
+ # ──── Copy Python dependencies from builder ────
43
+ COPY --from=builder /root/.local /root/.local
44
+
45
+ # ──── Set environment variables ────
46
+ ENV PATH=/root/.local/bin:$PATH \
47
+ PYTHONUNBUFFERED=1 \
48
+ PYTHONDONTWRITEBYTECODE=1 \
49
+ ENVIRONMENT=production \
50
+ WORKERS=2
51
+
52
+ # ──── Copy application code ────
53
+ COPY . .
54
+
55
+ # ──── Create necessary directories with proper permissions ────
56
+ RUN mkdir -p temp config static logs data && \
57
+ chmod 755 temp config static logs data
58
+
59
+ # ──── Health check ────
60
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
61
+ CMD curl -f http://localhost:5000/health || exit 1
62
+
63
+ # ──── Run as non-root user for security ────
64
+ RUN useradd -m -u 1000 appuser && \
65
+ chown -R appuser:appuser /app
66
+
67
+ USER appuser
68
+
69
+ # ──── Expose port ────
70
+ EXPOSE 5000
71
+
72
+ # ──── Run the application ────
73
+ CMD ["sh", "-c", "python -m uvicorn api:app --host 0.0.0.0 --port 5000 --workers ${WORKERS:-2} --loop uvloop --no-access-log"]
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "groq_gpt_oss_20b": {
3
3
  "key": "groq_gpt_oss_20b",
4
- "avg_response_s": 1.4180567239439565,
5
- "success_count": 84,
4
+ "avg_response_s": 1.5213420135082059,
5
+ "success_count": 85,
6
6
  "fail_count": 6,
7
7
  "down_until": null,
8
- "last_used": "2026-04-09T21:32:47.146221",
8
+ "last_used": "2026-04-10T06:49:02.416228",
9
9
  "last_error": null,
10
10
  "base_priority": 0.5
11
11
  },
@@ -599,16 +599,6 @@
599
599
  "last_error": null,
600
600
  "base_priority": 25
601
601
  },
602
- "dyn_arcee-ai_trinity-mini_free": {
603
- "key": "dyn_arcee-ai_trinity-mini_free",
604
- "avg_response_s": null,
605
- "success_count": 0,
606
- "fail_count": 0,
607
- "down_until": null,
608
- "last_used": null,
609
- "last_error": null,
610
- "base_priority": 28
611
- },
612
602
  "dyn_nvidia_nemotron-nano-9b-v2_free": {
613
603
  "key": "dyn_nvidia_nemotron-nano-9b-v2_free",
614
604
  "avg_response_s": null,
@@ -617,7 +607,7 @@
617
607
  "down_until": null,
618
608
  "last_used": null,
619
609
  "last_error": null,
620
- "base_priority": 29
610
+ "base_priority": 28
621
611
  },
622
612
  "dyn_minimax_minimax-m2_5_free": {
623
613
  "key": "dyn_minimax_minimax-m2_5_free",
@@ -627,7 +617,7 @@
627
617
  "down_until": null,
628
618
  "last_used": null,
629
619
  "last_error": null,
630
- "base_priority": 30
620
+ "base_priority": 29
631
621
  },
632
622
  "dyn_qwen_qwen3-coder_free": {
633
623
  "key": "dyn_qwen_qwen3-coder_free",
@@ -637,7 +627,7 @@
637
627
  "down_until": null,
638
628
  "last_used": null,
639
629
  "last_error": null,
640
- "base_priority": 31
630
+ "base_priority": 30
641
631
  },
642
632
  "dyn_liquid_lfm-2_5-1_2b-thinking_free": {
643
633
  "key": "dyn_liquid_lfm-2_5-1_2b-thinking_free",
@@ -647,7 +637,7 @@
647
637
  "down_until": null,
648
638
  "last_used": null,
649
639
  "last_error": null,
650
- "base_priority": 32
640
+ "base_priority": 31
651
641
  },
652
642
  "dyn_liquid_lfm-2_5-1_2b-instruct_free": {
653
643
  "key": "dyn_liquid_lfm-2_5-1_2b-instruct_free",
@@ -657,7 +647,7 @@
657
647
  "down_until": null,
658
648
  "last_used": null,
659
649
  "last_error": null,
660
- "base_priority": 33
650
+ "base_priority": 32
661
651
  },
662
652
  "dyn_arcee-ai_trinity-large-preview_free": {
663
653
  "key": "dyn_arcee-ai_trinity-large-preview_free",
@@ -667,7 +657,7 @@
667
657
  "down_until": null,
668
658
  "last_used": null,
669
659
  "last_error": null,
670
- "base_priority": 35
660
+ "base_priority": 34
671
661
  },
672
662
  "dyn_meta-llama_llama-3_2-3b-instruct_free": {
673
663
  "key": "dyn_meta-llama_llama-3_2-3b-instruct_free",
@@ -677,7 +667,7 @@
677
667
  "down_until": null,
678
668
  "last_used": null,
679
669
  "last_error": null,
680
- "base_priority": 39
670
+ "base_priority": 38
681
671
  },
682
672
  "dyn_google_gemma-3n-e2b-it_free": {
683
673
  "key": "dyn_google_gemma-3n-e2b-it_free",
@@ -687,7 +677,7 @@
687
677
  "down_until": null,
688
678
  "last_used": null,
689
679
  "last_error": null,
690
- "base_priority": 43
680
+ "base_priority": 42
691
681
  },
692
682
  "dyn_google_gemma-3-4b-it_free": {
693
683
  "key": "dyn_google_gemma-3-4b-it_free",
@@ -697,7 +687,7 @@
697
687
  "down_until": null,
698
688
  "last_used": null,
699
689
  "last_error": null,
700
- "base_priority": 44
690
+ "base_priority": 43
701
691
  },
702
692
  "dyn_v_google_gemma-3-4b-it_free": {
703
693
  "key": "dyn_v_google_gemma-3-4b-it_free",
@@ -707,7 +697,7 @@
707
697
  "down_until": null,
708
698
  "last_used": null,
709
699
  "last_error": null,
710
- "base_priority": 44
700
+ "base_priority": 43
711
701
  },
712
702
  "dyn_google_gemma-3n-e4b-it_free": {
713
703
  "key": "dyn_google_gemma-3n-e4b-it_free",
@@ -717,7 +707,7 @@
717
707
  "down_until": null,
718
708
  "last_used": null,
719
709
  "last_error": null,
720
- "base_priority": 45
710
+ "base_priority": 44
721
711
  },
722
712
  "dyn_google_gemma-3-12b-it_free": {
723
713
  "key": "dyn_google_gemma-3-12b-it_free",
@@ -727,7 +717,7 @@
727
717
  "down_until": null,
728
718
  "last_used": null,
729
719
  "last_error": null,
730
- "base_priority": 46
720
+ "base_priority": 45
731
721
  },
732
722
  "dyn_v_google_gemma-3-12b-it_free": {
733
723
  "key": "dyn_v_google_gemma-3-12b-it_free",
@@ -737,6 +727,6 @@
737
727
  "down_until": null,
738
728
  "last_used": null,
739
729
  "last_error": null,
740
- "base_priority": 46
730
+ "base_priority": 45
741
731
  }
742
732
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "cached_at": "2026-04-09T18:24:32.227486",
2
+ "cached_at": "2026-04-10T06:49:01.068927",
3
3
  "models": [
4
4
  {
5
5
  "id": "google/lyria-3-pro-preview",
@@ -427,58 +427,6 @@
427
427
  "details": "/api/v1/models/qwen/qwen3-next-80b-a3b-instruct-2509/endpoints"
428
428
  }
429
429
  },
430
- {
431
- "id": "arcee-ai/trinity-mini:free",
432
- "canonical_slug": "arcee-ai/trinity-mini-20251201",
433
- "hugging_face_id": "arcee-ai/Trinity-Mini",
434
- "name": "Arcee AI: Trinity Mini (free)",
435
- "created": 1764601720,
436
- "description": "Trinity Mini is a 26B-parameter (3B active) sparse mixture-of-experts language model featuring 128 experts with 8 active per token. Engineered for efficient reasoning over long contexts (131k) with robust function...",
437
- "context_length": 131072,
438
- "architecture": {
439
- "modality": "text->text",
440
- "input_modalities": [
441
- "text"
442
- ],
443
- "output_modalities": [
444
- "text"
445
- ],
446
- "tokenizer": "Other",
447
- "instruct_type": null
448
- },
449
- "pricing": {
450
- "prompt": "0",
451
- "completion": "0"
452
- },
453
- "top_provider": {
454
- "context_length": 131072,
455
- "max_completion_tokens": null,
456
- "is_moderated": false
457
- },
458
- "per_request_limits": null,
459
- "supported_parameters": [
460
- "include_reasoning",
461
- "max_tokens",
462
- "reasoning",
463
- "response_format",
464
- "structured_outputs",
465
- "temperature",
466
- "tool_choice",
467
- "tools",
468
- "top_k",
469
- "top_p"
470
- ],
471
- "default_parameters": {
472
- "temperature": 0.15,
473
- "top_p": 0.75,
474
- "frequency_penalty": null
475
- },
476
- "knowledge_cutoff": null,
477
- "expiration_date": "2026-04-10",
478
- "links": {
479
- "details": "/api/v1/models/arcee-ai/trinity-mini-20251201/endpoints"
480
- }
481
- },
482
430
  {
483
431
  "id": "nvidia/nemotron-nano-9b-v2:free",
484
432
  "canonical_slug": "nvidia/nemotron-nano-9b-v2",
@@ -1,124 +1,124 @@
1
- # ────────────────────────────────────────────────────────────────────────────────
2
- # SuperBrain Production Docker Compose Configuration
3
- # ────────────────────────────────────────────────────────────────────────────────
4
-
5
- services:
6
-
7
- # ──── Main SuperBrain API Service ────
8
- superbrain-api:
9
- image: superbrain:latest
10
- build:
11
- context: .
12
- dockerfile: Dockerfile
13
- container_name: superbrain-api
14
-
15
- # ──── Network & Ports ────
16
- ports:
17
- - "${API_PORT:-5000}:5000"
18
- networks:
19
- - superbrain-network
20
-
21
- # ──── Environment Variables ────
22
- environment:
23
- PYTHONUNBUFFERED: 1
24
- PYTHONDONTWRITEBYTECODE: 1
25
- ENVIRONMENT: ${ENVIRONMENT:-production}
26
- HOST: 0.0.0.0
27
- PORT: 5000
28
- WORKERS: ${WORKERS:-4}
29
- LOG_LEVEL: ${LOG_LEVEL:-INFO}
30
-
31
- # Database
32
- DATABASE_PATH: /app/data/superbrain.db
33
- DATABASE_TIMEOUT: 30
34
-
35
- # API Keys (load from .env file)
36
- GROQ_API_KEY: ${GROQ_API_KEY}
37
- GEMINI_API_KEY: ${GEMINI_API_KEY}
38
- GOOGLE_API_KEY: ${GOOGLE_API_KEY}
39
- OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
40
-
41
- # Instagram credentials
42
- INSTAGRAM_USERNAME: ${INSTAGRAM_USERNAME}
43
- INSTAGRAM_PASSWORD: ${INSTAGRAM_PASSWORD}
44
-
45
- # AI Configuration
46
- WHISPER_MODEL: ${WHISPER_MODEL:-base}
47
- WHISPER_USE_CLOUD: ${WHISPER_USE_CLOUD:-true}
48
-
49
- # Performance
50
- MAX_UPLOAD_SIZE: ${MAX_UPLOAD_SIZE:-52428800}
51
- REQUEST_TIMEOUT: ${REQUEST_TIMEOUT:-60}
52
- ANALYSIS_TIMEOUT: ${ANALYSIS_TIMEOUT:-120}
53
-
54
- # ──── Volumes ────
55
- volumes:
56
- # Database persistence
57
- - superbrain-db:/app/data
58
- # Configuration persistence
59
- - superbrain-config:/app/config
60
- # Temporary files
61
- - superbrain-temp:/app/temp
62
- # Uploads
63
- - superbrain-uploads:/app/static/uploads
64
- # Extracted ZIP Thumbnails
65
- - superbrain-thumbnails:/app/static/thumbnails
66
- # Logs
67
- - superbrain-logs:/app/logs
68
-
69
- # ──── Restart Policy ────
70
- restart: unless-stopped
71
-
72
- # ──── Health Check ────
73
- healthcheck:
74
- test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
75
- interval: 30s
76
- timeout: 10s
77
- retries: 3
78
- start_period: 40s
79
-
80
- # ──── Resource Limits (optional, enable for production) ────
81
- # uncomment to enable
82
- # deploy:
83
- # resources:
84
- # limits:
85
- # cpus: '2'
86
- # memory: 2G
87
- # reservations:
88
- # cpus: '1'
89
- # memory: 1G
90
-
91
- # ──── Security Options ────
92
- security_opt:
93
- - no-new-privileges:true
94
- read_only: false
95
- cap_drop:
96
- - ALL
97
- cap_add:
98
- - NET_BIND_SERVICE
99
-
100
- # ────────────────────────────────────────────────────────────────────────────────
101
- # Networks
102
- # ────────────────────────────────────────────────────────────────────────────────
103
-
104
- networks:
105
- superbrain-network:
106
- driver: bridge
107
-
108
- # ────────────────────────────────────────────────────────────────────────────────
109
- # Volumes for data persistence
110
- # ────────────────────────────────────────────────────────────────────────────────
111
-
112
- volumes:
113
- superbrain-db:
114
- driver: local
115
- superbrain-config:
116
- driver: local
117
- superbrain-temp:
118
- driver: local
119
- superbrain-uploads:
120
- driver: local
121
- superbrain-thumbnails:
122
- driver: local
123
- superbrain-logs:
124
- driver: local
1
+ # ────────────────────────────────────────────────────────────────────────────────
2
+ # SuperBrain Production Docker Compose Configuration
3
+ # ────────────────────────────────────────────────────────────────────────────────
4
+
5
+ services:
6
+
7
+ # ──── Main SuperBrain API Service ────
8
+ superbrain-api:
9
+ image: superbrain:latest
10
+ build:
11
+ context: .
12
+ dockerfile: Dockerfile
13
+ container_name: superbrain-api
14
+
15
+ # ──── Network & Ports ────
16
+ ports:
17
+ - "${API_PORT:-5000}:5000"
18
+ networks:
19
+ - superbrain-network
20
+
21
+ # ──── Environment Variables ────
22
+ environment:
23
+ PYTHONUNBUFFERED: 1
24
+ PYTHONDONTWRITEBYTECODE: 1
25
+ ENVIRONMENT: ${ENVIRONMENT:-production}
26
+ HOST: 0.0.0.0
27
+ PORT: 5000
28
+ WORKERS: ${WORKERS:-4}
29
+ LOG_LEVEL: ${LOG_LEVEL:-INFO}
30
+
31
+ # Database
32
+ DATABASE_PATH: /app/data/superbrain.db
33
+ DATABASE_TIMEOUT: 30
34
+
35
+ # API Keys (load from .env file)
36
+ GROQ_API_KEY: ${GROQ_API_KEY}
37
+ GEMINI_API_KEY: ${GEMINI_API_KEY}
38
+ GOOGLE_API_KEY: ${GOOGLE_API_KEY}
39
+ OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
40
+
41
+ # Instagram credentials
42
+ INSTAGRAM_USERNAME: ${INSTAGRAM_USERNAME}
43
+ INSTAGRAM_PASSWORD: ${INSTAGRAM_PASSWORD}
44
+
45
+ # AI Configuration
46
+ WHISPER_MODEL: ${WHISPER_MODEL:-base}
47
+ WHISPER_USE_CLOUD: ${WHISPER_USE_CLOUD:-true}
48
+
49
+ # Performance
50
+ MAX_UPLOAD_SIZE: ${MAX_UPLOAD_SIZE:-52428800}
51
+ REQUEST_TIMEOUT: ${REQUEST_TIMEOUT:-60}
52
+ ANALYSIS_TIMEOUT: ${ANALYSIS_TIMEOUT:-120}
53
+
54
+ # ──── Volumes ────
55
+ volumes:
56
+ # Database persistence
57
+ - superbrain-db:/app/data
58
+ # Configuration persistence
59
+ - superbrain-config:/app/config
60
+ # Temporary files
61
+ - superbrain-temp:/app/temp
62
+ # Uploads
63
+ - superbrain-uploads:/app/static/uploads
64
+ # Extracted ZIP Thumbnails
65
+ - superbrain-thumbnails:/app/static/thumbnails
66
+ # Logs
67
+ - superbrain-logs:/app/logs
68
+
69
+ # ──── Restart Policy ────
70
+ restart: unless-stopped
71
+
72
+ # ──── Health Check ────
73
+ healthcheck:
74
+ test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
75
+ interval: 30s
76
+ timeout: 10s
77
+ retries: 3
78
+ start_period: 40s
79
+
80
+ # ──── Resource Limits (optional, enable for production) ────
81
+ # uncomment to enable
82
+ # deploy:
83
+ # resources:
84
+ # limits:
85
+ # cpus: '2'
86
+ # memory: 2G
87
+ # reservations:
88
+ # cpus: '1'
89
+ # memory: 1G
90
+
91
+ # ──── Security Options ────
92
+ security_opt:
93
+ - no-new-privileges:true
94
+ read_only: false
95
+ cap_drop:
96
+ - ALL
97
+ cap_add:
98
+ - NET_BIND_SERVICE
99
+
100
+ # ────────────────────────────────────────────────────────────────────────────────
101
+ # Networks
102
+ # ────────────────────────────────────────────────────────────────────────────────
103
+
104
+ networks:
105
+ superbrain-network:
106
+ driver: bridge
107
+
108
+ # ────────────────────────────────────────────────────────────────────────────────
109
+ # Volumes for data persistence
110
+ # ────────────────────────────────────────────────────────────────────────────────
111
+
112
+ volumes:
113
+ superbrain-db:
114
+ driver: local
115
+ superbrain-config:
116
+ driver: local
117
+ superbrain-temp:
118
+ driver: local
119
+ superbrain-uploads:
120
+ driver: local
121
+ superbrain-thumbnails:
122
+ driver: local
123
+ superbrain-logs:
124
+ driver: local