Status: Partial
Package: beep/api/
Async HTTP transport to Beep.AI.Server: OpenAI-compatible chat, models, embeddings, RAG, Coding Assistant bootstrap, agent bundles, token check.
| Module | Role |
|---|---|
client.py |
BeepAPIClient, endpoint methods |
client_llm_support.py |
LLM request helpers |
client_workspace_support.py |
Workspace/bootstrap helpers |
client_agent_bundle_support.py |
Bundle import/export HTTP |
payloads.py |
Request body shaping |
streaming.py |
SSE parsing, tool-call sentinels |
- All commands that call the server (
chat,ask,agent,rag,status, …) - REPL model turns via
ChatSession
- Bearer auth on
/v1/*and/ai-middleware/api/* - Retries on 429/503; configurable timeout;
BeepAPIErrormapping - Streaming chat completions with tool deltas
- Health:
GET /api/health; optionalGET /ai-middleware/api/tokens/check
| ID | Enhancement | Priority | Verification |
|---|---|---|---|
| API-1 | OpenAPI-derived client stubs or contract tests against server OpenAPI | P2 | CI contract job |
| API-2 | Request/response redaction in debug logs (BEEP_LOG_JSON) |
P1 | Log snapshot test |
| API-3 | Connection pooling metrics in beep diagnostics |
P2 | Diagnostics output |
| API-4 | Automatic server version compatibility warning | P1 | Status command test |
| API-5 | Batch embeddings helper for large index jobs | P3 | Unit test |
| API-6 | Circuit breaker after repeated 5xx | P2 | Simulated failure test |