routes
routes
¶
Route handlers for the OpenAI-compatible API server.
Classes¶
Functions¶
chat_completions
async
¶
Handle chat completion requests (streaming and non-streaming).
Source code in src/openjarvis/server/routes.py
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 | |
list_models
async
¶
List selectable engine models for the installed-model picker.
Direct cloud models live in the Cloud Models tab. Models advertised by a configured LiteLLM engine remain here because LiteLLM owns their routing and may use provider-qualified IDs that resemble OpenRouter IDs.
Source code in src/openjarvis/server/routes.py
pull_model
async
¶
Pull / download a model from the Ollama registry.
Source code in src/openjarvis/server/routes.py
delete_model
async
¶
Delete a model from Ollama.
Source code in src/openjarvis/server/routes.py
reload_cloud_engine
async
¶
Hot-reload cloud API keys and (re-)initialize the cloud engine.
Called by the desktop app immediately after the user saves a cloud API key so that cloud models become available without a full app restart.
Source code in src/openjarvis/server/routes.py
1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 | |
savings
async
¶
Return savings summary compared to cloud providers.
Only includes telemetry from the current server session so that counters start at zero each time a new model + agent is launched.
Source code in src/openjarvis/server/routes.py
reset_telemetry
async
¶
Clear all stored telemetry records.
Useful after updating token-counting methodology — clears historical records that were computed under the old rules so that the savings dashboard and leaderboard submissions start fresh with corrected values.
Source code in src/openjarvis/server/routes.py
server_info
async
¶
Return server configuration: model, agent, engine.
Source code in src/openjarvis/server/routes.py
health
async
¶
Health check endpoint.
Source code in src/openjarvis/server/routes.py
list_channels
async
¶
List available messaging channels.
Source code in src/openjarvis/server/routes.py
channel_send
async
¶
Send a message to a channel.
Source code in src/openjarvis/server/routes.py
channel_status
async
¶
Return channel bridge connection status.
Source code in src/openjarvis/server/routes.py
security_scan
async
¶
Run a read-only security environment audit and return findings.