Skip to main content

Protocol-aware client for DeepSeek V4-Pro / V4-Flash. Survives the 16 documented quirks; ships the cache discount.

Project description

deepseek-harness

Protocol-aware Python client for DeepSeek V4-Pro / V4-Flash. Survives the 16 documented quirks; ships the 50× cache discount.

pip install deepseek-harness
from deepseek_harness import DeepSeekHarness

c = DeepSeekHarness(disable_thinking_by_default=True)
out = c.chat(
    model="deepseek-v4-pro",
    messages=[{"role": "user", "content": "Hello"}],
    max_tokens=4096,
)
print(out["message"]["content"])
print(f"cost: ${out['usage']['estimated_cost_usd']:.6f}  ·  cache hit: {out['usage']['cache_hit_rate']:.0%}")

The harness wraps openai.OpenAI and enforces 10 contract rules by default. See the main repository for the full spec, probe corpus, and three other distribution forms (dsh CLI, @deepseek-harness/mcp server, Anthropic SKILL.md).

License: MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepseek_harness-0.2.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deepseek_harness-0.2.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file deepseek_harness-0.2.0.tar.gz.

File metadata

  • Download URL: deepseek_harness-0.2.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for deepseek_harness-0.2.0.tar.gz
Algorithm Hash digest
SHA256 360843a7fa2ffefa8b23aa3c75507013c16ef9786eaf27b509382602999983b3
MD5 7f287a4bf2b4d6dfb07a9c82981bada8
BLAKE2b-256 f778299c3532c0a6f6ec3e2b17fc89e4bd00d3f51c3991ea84bede60fd2e5eba

See more details on using hashes here.

File details

Details for the file deepseek_harness-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deepseek_harness-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cdb989065ebea5e6b1a00b5fd10229d821d2e5aa4c08f2fa1d7020ac7517fb42
MD5 636104d34e82e9104c5fef09f6ab39a4
BLAKE2b-256 a27ae66f2670d901a96ab336dabfdd69514c1db850549d2918cde362bfc85cd3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page