jharness-models
OpenAI Chat (Chat Completions API), OpenAI Responses, and Anthropic Messages adapters, plus 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 | Function calls | None | Content and calls are normalized into ModelResponse.output |
| Anthropic Messages | Client tool_use |
Official web-search preset | Native block order is retained |
| OpenAI Responses | Function and custom calls | Official web-search and image-generation presets | Native Responses item order is retained |
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 and Messages profile classes remain
provider-tool neutral. The official openai_responses_profile() and
anthropic_messages_profile() factories install their hosted-tool identities and
capabilities, but do not add a tool to any request. Hosted-tool mapping is a closed,
protocol-owned union; profiles cannot inject custom wire codecs. The host must still
pass an explicit ProviderToolSpec factory result to Runtime, and selecting an official profile is
the host's confirmation that the chosen endpoint and model support its advertised
capabilities. Tool selection is declared as a set of supported types rather than a
coarse boolean. Supplier factories only compose protocol capabilities and wire
policies; each adapter emits only its documented protocol wire.
Capabilities are host assertions rather than live endpoint discovery. JHarness blocks
requests outside the selected profile, but an overstated profile may still reach a
provider that rejects, ignores, or degrades the claimed feature. Use an exact,
model-appropriate profile. Image MIME ArtifactRef values count as image inputs:
Responses emits input_image, Anthropic Messages emits an image file source, and Chat
uses the standard nested file content part and therefore also requires file input.
from jharness.kernel import Runtime
from jharness.models.openai import (
OpenAIResponsesModel,
openai_responses_profile,
openai_responses_web_search,
)
model = OpenAIResponsesModel(..., profile=openai_responses_profile())
runtime = Runtime(
model=model,
provider_tools=(openai_responses_web_search(),),
)
OpenAI Responses sends store=false by default and requests encrypted reasoning
history; assistant and reasoning history is replayed only from complete native Responses
output items. Hosted image generation additionally requires a host-owned
OpenAIResponsesArtifactStore; 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jharness_models-0.9.0.tar.gz.
File metadata
- Download URL: jharness_models-0.9.0.tar.gz
- Upload date:
- Size: 73.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d99512a44beeed389a7b9f9e30436b094dbbd3f127251e31c345a3213a93ca10
|
|
| MD5 |
e727e294a3de2a9e459d2e0ce61b280d
|
|
| BLAKE2b-256 |
5812d8b9702db14abae018719b0afebb456f8b8147eb86f65a38082ab690818a
|
Provenance
The following attestation bundles were made for jharness_models-0.9.0.tar.gz:
Publisher:
release.yml on Ezio2000/jharness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jharness_models-0.9.0.tar.gz -
Subject digest:
d99512a44beeed389a7b9f9e30436b094dbbd3f127251e31c345a3213a93ca10 - Sigstore transparency entry: 2650333227
- Sigstore integration time:
-
Permalink:
Ezio2000/jharness@23efbbb235e69d80ff81d28bb34e4d084ba5c378 -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/Ezio2000
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@23efbbb235e69d80ff81d28bb34e4d084ba5c378 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jharness_models-0.9.0-py3-none-any.whl.
File metadata
- Download URL: jharness_models-0.9.0-py3-none-any.whl
- Upload date:
- Size: 93.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cce9798f16397867ad9a0fdd98a3517ebf0f301414bd39078fcaf12232fa187
|
|
| MD5 |
8955aeb30e018cff29106aac2c4283a7
|
|
| BLAKE2b-256 |
9cec0b7e846e1a152218fee15cf821a66ee0166c9e751eacdd455201e4d41823
|
Provenance
The following attestation bundles were made for jharness_models-0.9.0-py3-none-any.whl:
Publisher:
release.yml on Ezio2000/jharness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jharness_models-0.9.0-py3-none-any.whl -
Subject digest:
5cce9798f16397867ad9a0fdd98a3517ebf0f301414bd39078fcaf12232fa187 - Sigstore transparency entry: 2650333246
- Sigstore integration time:
-
Permalink:
Ezio2000/jharness@23efbbb235e69d80ff81d28bb34e4d084ba5c378 -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/Ezio2000
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@23efbbb235e69d80ff81d28bb34e4d084ba5c378 -
Trigger Event:
push
-
Statement type: