dsh-openai
OpenAI-compatible /v1/chat/completions HTTP bridge backed by the DeepSeek
Harness Python SDK (deepseek-harness-sdk), so any OpenAI client
(OpenWebUI, official SDKs, curl) can drive a full coding agent — tools,
sandbox, persistent shell — instead of a plain chat model. The agent works in
a per-session directory and delivers its files through signed download links.
This directory is both the PyPI packaging root and the Docker build context. The full deployment documentation (compose, Caddy/TLS, env matrices, security notes) lives in the repository README.
Install & run
pip install dsh-openai # or, from a checkout: pip install -e .
set DEEPSEEK_API_KEY=sk-xxxx # upstream model credential (export on Linux/macOS)
dsh_openai serve # -> http://127.0.0.1:8000/v1
python -m dsh_openai serve is identical. serve applies local-development
defaults (loopback bind, ~/.dsh-openai/{home,workspaces}, in-process
fakeredis, the shipped editor profile patch); precedence is
CLI flag > DSH_OPENAI_* env > local default. Run
dsh_openai serve --help for the flag list.
Endpoints
POST /v1/chat/completions— JSON and SSE streamingGET /v1/models,GET /healthz(auth-free liveness)GET /v1/dsh/info,GET /v1/dsh/sessions/{id}/files,GET /v1/dsh/files/{token}(signed deliverable download)
Pin a conversation with the x-dsh-session-id header or a stable chat_id
body field; both map onto one dsh session and one workspace directory.
Configuration
All runtime settings are DSH_OPENAI_* environment variables resolved by
dsh_openai/config.py — including DSH_OPENAI_API_KEY (inbound bearer
token), DSH_OPENAI_MODEL, DSH_OPENAI_MAX_SESSIONS, DSH_OPENAI_REDIS_URL,
DSH_OPENAI_SYSTEM_PROMPT and DSH_OPENAI_PATCHES. Relative patch paths
resolve against the installed package, so the shipped
dsh_openai/patches/editor.patch.yml works from any cwd.
Development
pip install -e .[dev]
python -m pytest tests
License
Apache-2.0 — see the LICENSE file (mirrored from the repository root).
Metadata
Release files for dsh-openai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dsh_openai-0.1.0.tar.gz | 81.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dsh_openai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 139.1 kB
Release files / dsh_openai-0.1.0.tar.gz
| Download URL | dsh_openai-0.1.0.tar.gz |
|---|---|
| Size | 81.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e88ea655a094141b6ffc759f91a021adb55834a2a1e8f71029e3059e20ced214
|
|
BLAKE2b-256 checksum How to use checksums |
057dda15b49bd8814e435d91a408f4121aecf24240336008e513c83a70820c4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.7
|
Release files / dsh_openai-0.1.0-py3-none-any.whl
| Download URL | dsh_openai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 58.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c93e9dbd5224cd10fb73664704c9f712e7079b3efcd0740627a5cfddd5bd0525
|
|
BLAKE2b-256 checksum How to use checksums |
83e4302d8b80ade71642912a7796bc7176365ecf75473c3851e325f1eed724ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.7
|