Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 8d60c95

Browse files
authored
Merge pull request #1696 from janhq/dev
Chore: Sync dev to main
2 parents 49f72aa + 6892823 commit 8d60c95

File tree

702 files changed

+67141
-42482
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

702 files changed

+67141
-42482
lines changed
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
---
2+
name: QA Checklist
3+
about: QA Checklist
4+
title: 'QA: [VERSION]'
5+
labels: 'type: QA checklist'
6+
assignees: ''
7+
---
8+
**QA details:**
9+
10+
Version: `v1.0.x-xxx`
11+
12+
OS (select one)
13+
- [ ] Windows 11 (online & offline)
14+
- [ ] Ubuntu 24, 22 (online & offline)
15+
- [ ] Mac Silicon OS 14/15 (online & offline)
16+
- [ ] Mac Intel (online & offline)
17+
18+
--------
19+
20+
# 1. Manual QA (CLI)
21+
## Installation
22+
- [ ] it should install with local installer (default; no internet required during installation, all dependencies bundled)
23+
- [ ] it should install with network installer
24+
- [ ] it should install 2 binaries (cortex and cortex-server) [mac: binaries in `/usr/local/bin`]
25+
- [ ] it should install with correct folder permissions
26+
- [ ] it should install with folders: /engines /logs (no /models folder until model pull)
27+
- [ ] It should install with Docker image https://cortex.so/docs/installation/docker/
28+
29+
## Data/Folder structures
30+
- [ ] cortex.so models are stored in `cortex.so/model_name/variants/`, with .gguf and model.yml file
31+
- [ ] huggingface models are stored `huggingface.co/author/model_name` with .gguf and model.yml file
32+
- [ ] downloaded models are saved in cortex.db with the right fields: `model`, `author_repo_id`, `branch_name`, `path_to_model_yaml` (view via SQL)
33+
34+
## Cortex Update
35+
- [ ] cortex -v should check output current version and check for updates
36+
- [ ] cortex update replaces the app, installer, uninstaller and binary file (without installing cortex.llamacpp)
37+
- [ ] `cortex update` should update from ~3-5 versions ago to latest (+3 to 5 bump)
38+
- [ ] `cortex update` should update from the previous version to latest (+1 bump)
39+
- [ ] `cortex update -v 1.x.x-xxx` should update from the previous version to specified version
40+
- [ ] `cortex update` should update from previous stable version to latest
41+
- [ ] it should gracefully update when server is actively running
42+
43+
## Overall / App Shell
44+
- [ ] cortex returns helpful text in a timely* way (< 5s)
45+
- [ ] `cortex` or `cortex -h` displays help commands
46+
- [ ] CLI commands should start the API server, if not running [except
47+
- [ ] it should correctly log to cortex-cli.log and cortex.log
48+
- [ ] There should be no stdout from inactive shell session
49+
50+
## Engines
51+
- [ ] llama.cpp should be installed by default
52+
- [ ] it should run gguf models on llamacpp
53+
- [ ] it should list engines
54+
- [ ] it should get engines
55+
- [ ] it should install engines (latest version if not specified)
56+
- [ ] it should install engines (with specified variant and version)
57+
- [ ] it should get default engine
58+
- [ ] it should set default engine (with specified variant/version)
59+
- [ ] it should load engine
60+
- [ ] it should unload engine
61+
- [ ] it should update engine (to latest version)
62+
- [ ] it should update engine (to specified version)
63+
- [ ] it should uninstall engines
64+
- [ ] it should gracefully continue engine installation if interrupted halfway (partial download)
65+
- [ ] it should gracefully handle when users try to CRUD incompatible engines (No variant found for xxx)
66+
- [ ] it should run trtllm models on trt-llm [WIP, not tested]
67+
- [ ] it shoud handle engine variants [WIP, not tested]
68+
- [ ] it should update engines versions [WIP, not tested]
69+
70+
## Server
71+
- [ ] `cortex start` should start server and output localhost URL & port number
72+
- [ ] users can access API Swagger documentation page at localhost URL & port number
73+
- [ ] `cortex start` can be configured with parameters (port, [logLevel [WIP]](https://github.com/janhq/cortex.cpp/pull/1636)) https://cortex.so/docs/cli/start/
74+
- [ ] it should correctly log to cortex logs (logs/cortex.log, logs/cortex-cli.log)
75+
- [ ] `cortex ps` should return server status and running models (or no model loaded)
76+
- [ ] `cortex stop` should stop server
77+
78+
## Model Pulling
79+
- [ ] Pulling a model should pull .gguf and model.yml file
80+
- [ ] Model download progress should appear as download bars for each file
81+
- [ ] Model download progress should be accurate (%, total time, download size, speed)
82+
### cortex.so
83+
- [ ] it should pull by built in model_ID
84+
- [ ] pull by model_ID should recommend default variant at the top (set in HF model.yml)
85+
- [ ] it should pull by built-in model_id:variant
86+
### huggingface.co
87+
- [ ] it should pull by HF repo/model ID
88+
- [ ] it should pull by full HF url (ending in .gguf)
89+
### Interrupted Download
90+
- [ ] it should allow user to interrupt / stop download
91+
- [ ] pulling again after interruption should accurately calculates remainder of model file size neeed to be downloaded (`Found unfinished download! Additional XGB needs to be downloaded`)
92+
- [ ] it should allow to continue downloading the remainder after interruption
93+
94+
## Model Management
95+
- [ ] it should list downloaded models
96+
- [ ] it should get a local model
97+
- [ ] it should update model parameters in model.yaml
98+
- [ ] it should delete a model
99+
- [ ] it should import models with model_id and model_path
100+
101+
## Model Running
102+
- [ ] `cortex run <cortexso model>` - if no local models detected, shows `pull` model menu
103+
- [ ] `cortex run` - if local model detected, runs the local model
104+
- [ ] `cortex run` - if multiple local models detected, shows list of local models (from multiple model sources eg cortexso, HF authors) for users to select (via regex search)
105+
- [ ] `cortex run <invalid model id>` should return gracefully `Model not found!`
106+
- [ ] run should autostart server
107+
- [ ] `cortex run <model>` starts interactive chat (by default)
108+
- [ ] `cortex run <model> -d` runs in detached mode
109+
- [ ] `cortex models start <model>`
110+
- [ ] terminate StdIn or `exit()` should exit interactive chat
111+
112+
## Hardware Detection / Acceleration [WIP, no need to QA]
113+
- [ ] it should auto offload max ngl
114+
- [ ] it should correctly detect available GPUs
115+
- [ ] it should gracefully detect missing dependencies/drivers
116+
CPU Extension (e.g. AVX-2, noAVX, AVX-512)
117+
GPU Acceleration (e.g. CUDA11, CUDA12, Vulkan, sycl, etc)
118+
119+
## Uninstallation / Reinstallation
120+
- [ ] it should uninstall 2 binaries (cortex and cortex-server)
121+
- [ ] it should uninstall with 2 options to delete or not delete data folder
122+
- [ ] it should gracefully uninstall when server is still running
123+
- [ ] uninstalling should not leave any dangling files
124+
- [ ] uninstalling should not leave any dangling processes
125+
- [ ] it should reinstall without having conflict issues with existing cortex data folders
126+
127+
--
128+
# 2. API QA
129+
130+
## Checklist for each endpoint
131+
- [ ] Upon `cortex start`, API page is displayed at localhost:port endpoint
132+
- [ ] Endpoints should support the parameters stated in API reference (towards OpenAI Compatibility)
133+
- [ ] https://cortex.so/api-reference is updated
134+
135+
## Endpoints
136+
### Chat Completions
137+
- [ ] POST `v1/chat/completions`
138+
- [ ] Cortex supports Function Calling #295
139+
140+
### Engines
141+
- [ ] List engines: GET `/v1/engines`
142+
- [ ] Get engine: GET `/v1/engines/{name}`
143+
- [ ] Install engine: POST `/v1/engines/install/{name}`
144+
- [ ] Get default engine variant/version: GET `v1/engines/{name}/default`
145+
- [ ] Set default engine variant/version: POST `v1/engines/{name}/default`
146+
- [ ] Load engine: POST `v1/engines/{name}/load`
147+
- [ ] Unload engine: DELETE `v1/engines/{name}/load`
148+
- [ ] Update engine: POST `v1/engines/{name}/update`
149+
- [ ] uninstall engine: DELETE `/v1/engines/install/{name}`
150+
151+
### Pulling Models
152+
- [ ] Pull model: POST `/v1/models/pull` starts download (websockets)
153+
- [ ] Pull model: `websockets /events` emitted
154+
- [ ] Stop model download: DELETE `/v1/models/pull` (websockets)
155+
- [ ] Stop model download: `websockets /events` stopped
156+
- [ ] Import model: POST `v1/models/import`
157+
158+
### Running Models
159+
- [ ] List models: GET `v1/models`
160+
- [ ] Start model: POST `/v1/models/start`
161+
- [ ] Stop model: POST `/v1/models/stop`
162+
- [ ] Get model: GET `/v1/models/{id}`
163+
- [ ] Delete model: DELETE `/v1/models/{id}`
164+
- [ ] Update model: PATCH `/v1/models/{model}` updates model.yaml params
165+
166+
## Server
167+
- [ ] CORs [WIP]
168+
- [ ] health: GET `/healthz`
169+
- [ ] terminate server: DELETE `/processManager/destroy`
170+
--------
171+
Test list for reference:
172+
- #1357 e2e tests for APIs in CI
173+
- #1147, #1225 for starting QA list

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "\U0001F41B Bug Report"
2+
description: "If something isn't working as expected \U0001F914"
3+
labels: [ "type: bug" ]
4+
title: 'bug: [DESCRIPTION]'
5+
6+
body:
7+
- type: input
8+
validations:
9+
required: true
10+
attributes:
11+
label: "Cortex version"
12+
description: "**Tip:** `cortex -v` outputs the version number"
13+
14+
- type: textarea
15+
validations:
16+
required: true
17+
attributes:
18+
label: "Describe the issue and expected behaviour"
19+
description: "A clear & concise description of the issue encountered"
20+
21+
- type: textarea
22+
attributes:
23+
label: "Steps to Reproduce"
24+
description: |
25+
Please list out steps to reproduce the issue
26+
placeholder: |
27+
1. Go to '...'
28+
2. Click on '...'
29+
30+
- type: textarea
31+
attributes:
32+
label: "Screenshots / Logs"
33+
description: |
34+
Please include cortex-cli.log and cortex.log files in: ~/cortex/logs/
35+
36+
- type: checkboxes
37+
attributes:
38+
label: "What is your OS?"
39+
options:
40+
- label: Windows
41+
- label: Mac Silicon
42+
- label: Mac Intel
43+
- label: Linux / Ubuntu
44+
45+
- type: checkboxes
46+
attributes:
47+
label: "What engine are you running?"
48+
options:
49+
- label: cortex.llamacpp (default)
50+
- label: cortex.tensorrt-llm (Nvidia GPUs)
51+
- label: cortex.onnx (NPUs, DirectML)
52+
53+
- type: input
54+
attributes:
55+
label: "Hardware Specs eg OS version, GPU"
56+
description:
57+
58+

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## To encourage contributors to use issue templates, we don't allow blank issues
2+
blank_issues_enabled: true
3+
4+
contact_links:
5+
- name: "\1F4AC Cortex Discussions"
6+
url: "https://github.com/orgs/janhq/discussions/categories/q-a"
7+
about: "Get help, discuss features & roadmap, and share your projects"

.github/ISSUE_TEMPLATE/discussion-thread.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/epic-request.md

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,56 @@ labels: 'type: epic'
66
assignees: ''
77

88
---
9+
## Goal
910

10-
**Problem**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1211

13-
**Success Criteria**
14-
A clear and concise description of what you want to happen.
12+
## Success Criteria
1513

16-
**Sub Issues**
17-
-
1814

19-
**Additional context**
20-
Add any other context or screenshots about the epic request here.
15+
## Tasklist
16+
- [ ]
17+
18+
## API / CLI Documentation
19+
### API
20+
#### 1. Feature
21+
```
22+
GET /v1/endpoint
23+
```
24+
25+
Body:
26+
```json
27+
{
28+
"key": "value"
29+
}
30+
```
31+
**Response**
32+
```json
33+
200
34+
{
35+
}
36+
Error
37+
{
38+
}
39+
```
40+
41+
### CLI
42+
#### 1. Feature
43+
```
44+
GET /v1/endpoint
45+
```
46+
Response:
47+
```
48+
```
49+
#### Help Command
50+
```
51+
❯ cortex ...
52+
Usage:
53+
cortex [options] [subcommand]
54+
Options:
55+
-h,--help Print this help message and exit
56+
... ...
57+
58+
Subcommands:
59+
start Start a model by ID
60+
... ...
61+
```

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)