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
1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 | |
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.