Skip to main content

jharness-models

OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages adapters; DeepSeek profiles; and provider-neutral model composition for the JHarness kernel.

uv add jharness-models
from jharness.models.openai import OpenAIResponsesModel
Adapter Runtime tools Provider-hosted tools Ordered output
OpenAI Chat Completions Function calls None Content and calls are normalized into ModelResponse.output
Anthropic Messages Client tool_use Profile-installed server-tool codecs Native block order is retained
OpenAI Responses Function and freeform calls Profile-installed image generation and web search codecs Native Responses item order is retained

DeepSeek's native Responses endpoint uses OpenAIResponsesModel with deepseek_openai_responses_profile. That profile is text-only, accepts only deepseek-v4-flash, exposes provider-hosted web search plus the exact freeform apply_patch runtime tool, and forces stateless requests with complete history. The DeepSeek Anthropic profile independently exposes its verified server-side web search.

Model modalities describe what the model itself understands or produces. Tool ownership is separate: RuntimeToolCall is executed by the JHarness runtime, while a ProviderToolCall records work already executed by the supplier. Both remain interleaved with ContentPart values in ordered output.

Each protocol profile contains the exact immutable ModelCapabilities returned by its model client. The default Responses profile is conservative and text-only; model-specific modalities, structured output, and hosted tools require explicit host opt-in. Tool selection is declared as a set of supported types rather than a coarse boolean. Supplier factories only compose protocol capabilities and wire policies; the shared codecs contain no supplier-name branches.

OpenAI Responses sends store=false by default and requests encrypted reasoning history. Hosted image generation additionally requires a host-owned ResponsesArtifactStore; generated base64 is persisted externally and durable history contains only integrity-bearing ArtifactRef values. Stores must be durable, idempotent, safe for provider-controlled call ids, available during run recovery, and responsible for retention and garbage collection of uncommitted saves.

Retry and fallback compose directly around model values:

from jharness.models.decorators import FallbackModel, RetryingModel

model = FallbackModel(
    RetryingModel(primary_model, max_attempts=3),
    RetryingModel(backup_model, max_attempts=2),
)

Installing this distribution installs the exact matching jharness-kernel version. Provider configuration and composition details are in the model adapter guide.

Download files

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

Source Distribution

jharness_models-0.6.0.tar.gz (63.5 kB view details)

Uploaded Source

Built Distribution

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

jharness_models-0.6.0-py3-none-any.whl (83.9 kB view details)

Uploaded Python 3

File details

Details for the file jharness_models-0.6.0.tar.gz.

File metadata

  • Download URL: jharness_models-0.6.0.tar.gz
  • Upload date:
  • Size: 63.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jharness_models-0.6.0.tar.gz
Algorithm Hash digest
SHA256 1f088302158c79e2e5a641e1f49cd9b124c14f211e33eaff2ca6893f733daf57
MD5 4e65611c0e873a9289e39a057c6e951e
BLAKE2b-256 8428d793507e32a1192875e721c39df59a3d86cc8d71034d2621890f6c8f750d

See more details on using hashes here.

Provenance

The following attestation bundles were made for jharness_models-0.6.0.tar.gz:

Publisher: release.yml on Ezio2000/jharness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jharness_models-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: jharness_models-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 83.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jharness_models-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11dcbe063da426cf89b11bef0459247fc12887716d2aef9dbc8c72c39ae79a30
MD5 820886dae3696fc4b38162729a7c1b0c
BLAKE2b-256 1c3ea4d1d53d8325db7fc1c4c3e539c3607ada52d6b8740f1d9f4c42316e49e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for jharness_models-0.6.0-py3-none-any.whl:

Publisher: release.yml on Ezio2000/jharness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.1

2 files

This release

0.6.0 This release

2 files

0.5.0

2 files

0.4.0

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page