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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dsh_openai-0.1.1.tar.gz | 84.9 kB | Without provenance | Details for dsh_openai-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dsh_openai-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for dsh_openai-0.1.1-py3-none-any.whl |
Total release size: 144.1 kB
Release files / dsh_openai-0.1.1.tar.gz
| Download URL | dsh_openai-0.1.1.tar.gz |
|---|---|
| Size | 84.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17890f75e85c381617e45c14541efad1fb4e89c5caf5b0544b7c53402d1e9665
|
|
BLAKE2b-256 checksum How to use checksums |
808daca48b38e8e9f9600dd809fe012ade3ff27430a0fa05c9fe136140dd7c4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / dsh_openai-0.1.1-py3-none-any.whl
| Download URL | dsh_openai-0.1.1-py3-none-any.whl |
|---|---|
| Size | 59.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25dee491170f82c6ae8b3b12690aa94056cf96fc80ef97d2152665eb5ad5cac1
|
|
BLAKE2b-256 checksum How to use checksums |
1fb8f5e621bc91737ace0abd397d188dc401f0ae2d61b365734fc14b99a099d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for dsh-openai 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.