[routes] cookbook_routes.py at 1920 lines massively exceeds AGENTS.md ~400 line limit #775

Closed
opened 2026-06-03 00:28:42 +02:00 by sleepy · 0 comments
Owner

Problem

routes/cookbook_routes.py is 1920 lines with 41 function definitions spanning:

  • Model download management
  • Model serving (vLLM, SGLang, llama.cpp, diffusers)
  • GPU management and diagnostics
  • SSH remote execution
  • HuggingFace API integration
  • State management (cookbook state CRUD)
  • Process monitoring and diagnosis
  • Secret encryption/decryption
  • SSH key management

Plus it imports from routes.shell_routes directly (TMUX_LOG_DIR), creating cross-route coupling.

AGENTS.md violation

Split files that exceed ~400 lines or contain multiple concerns.

Suggested split

  • routes/cookbook/download.py — model download routes
  • routes/cookbook/serve.py — model serve routes
  • routes/cookbook/gpu.py — GPU management routes
  • routes/cookbook/state.py — state CRUD
  • routes/cookbook/ssh.py — SSH key and remote execution helpers
  • routes/cookbook/crypto.py — secret encryption/decryption
  • routes/cookbook/hf.py — HuggingFace API integration
## Problem `routes/cookbook_routes.py` is 1920 lines with 41 function definitions spanning: - Model download management - Model serving (vLLM, SGLang, llama.cpp, diffusers) - GPU management and diagnostics - SSH remote execution - HuggingFace API integration - State management (cookbook state CRUD) - Process monitoring and diagnosis - Secret encryption/decryption - SSH key management Plus it imports from `routes.shell_routes` directly (`TMUX_LOG_DIR`), creating cross-route coupling. ## AGENTS.md violation > Split files that exceed ~400 lines or contain multiple concerns. ## Suggested split - `routes/cookbook/download.py` — model download routes - `routes/cookbook/serve.py` — model serve routes - `routes/cookbook/gpu.py` — GPU management routes - `routes/cookbook/state.py` — state CRUD - `routes/cookbook/ssh.py` — SSH key and remote execution helpers - `routes/cookbook/crypto.py` — secret encryption/decryption - `routes/cookbook/hf.py` — HuggingFace API integration
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/odysseus#775
No description provided.