Skip to main content

PromptLedger OpenAI-compatible provider

Optional SDK v1 provider for PromptLedger 0.8.x; Python standard library only. Core remains offline-capable without it. Supports text Chat Completions and model listing. Presets: openrouter, openai, deepseek, groq, lmstudio (127.0.0.1:1234), vllm (127.0.0.1:8000), and custom (explicit base_url). Only protocol compatibility is intended; individual models and providers may differ.

Install with python -m pip install promptledger-openai-compatible. From a source checkout, install Core first, then use python -m pip install -e ./plugins/openai-compatible --no-deps. Use promptledger plugins conformance openai-compatible --confirm to verify structural compatibility.

Remote calls

Set the appropriate environment variable: OPENROUTER_API_KEY, OPENAI_API_KEY, DEEPSEEK_API_KEY, GROQ_API_KEY, LMSTUDIO_API_KEY, VLLM_API_KEY or PROMPTLEDGER_API_KEY (custom only). Never include keys in options, prompts, files or command arguments. Keys are not persisted by this plugin. Local loopback services may omit credentials.

Example options file for promptledger plugins run openai-compatible evaluate --options-file options.json --confirm:

{
  "id": "api-demo", "ref": 1,
  "provider": "openrouter", "allow_remote": true,
  "model": "REPLACE_WITH_MODEL_ID", "expected": "HELLO", "max_tokens": 1024
}

Create api-demo first. Use a model ID available to your account. For model listing use healthcheck and an options file containing only provider and allow_remote (plus base_url for custom). Presets cannot be redirected to custom endpoints. HTTPS is required except literal loopback; proxies and redirects are disabled. The endpoint must be trusted, including loopback servers which may themselves forward requests to cloud services. Remote calls require explicit consent and can cost money; there is no automatic cloud fallback or retry. Token caps are not a monetary budget. The provider does not control remote logging, routing or retention.

Results

A case-sensitive substring check is recorded against the exact saved version. The selected prompt is sent as a user message; the expected text stays local. A normal textual completion is required; incomplete/refused/nontext responses cause an error rather than a saved failed check. Tokens and OpenRouter-reported USD cost are recorded only when present; no estimated charges. Raw response and API key are not stored. Suite is openai-compatible:<preset>; dataset_hash identifies the test protocol (expected text, endpoint, requested model, output limit and message role), rather than a benchmark dataset. Use identical settings for comparisons. Provider-side routing or model changes can still affect reproducibility. Secret detection is heuristic, not a guarantee. The SDK is not sandboxed. The dashboard supports the fixed local/cloud presets, explicit model discovery and per-run remote approval. Custom endpoints remain CLI-only. DeepSeek Flash and OpenRouter Free passed live CLI smoke tests; other provider/model combinations are not all live-tested. Dynamic OpenRouter routing IDs are smoke-test only and cannot be used for regression gates or guarded promotion. Batch jobs are not executed.

For DeepSeek and OpenRouter, optionally set "thinking": false to request non-thinking mode on models supporting it. This option is included in comparison identity. The remote service controls actual token usage.

See the integration guide and SDK guide for the plugin lifecycle.

Metadata

Release files for promptledger-openai-compatible 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for promptledger-openai-compatible 0.1.0
File Size Uploaded Provenance Actions
promptledger_openai_compatible-0.1.0.tar.gz 8.3 kB Without provenance Details for promptledger_openai_compatible-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for promptledger-openai-compatible 0.1.0
File Interpreter ABI Platform Actions
promptledger_openai_compatible-0.1.0-py3-none-any.whl Python 3 none any Details for promptledger_openai_compatible-0.1.0-py3-none-any.whl

Total release size: 17.2 kB

Release files / promptledger_openai_compatible-0.1.0.tar.gz

Download URL promptledger_openai_compatible-0.1.0.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
16b177213f69fbb729fbae1b7563a70d6d3189f51688572445ebd9eb67682259
BLAKE2b-256 checksum
How to use checksums
80d0309faebb71abbede31b36ee94d1776f8977f63d03e8640c5db0335e57970
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / promptledger_openai_compatible-0.1.0-py3-none-any.whl

Download URL promptledger_openai_compatible-0.1.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee7c8be756d0faa8842a558cbcfb68f0627bdb8b20dd8a456695c4b632d41236
BLAKE2b-256 checksum
How to use checksums
5a125b7d894c3e6ab084cd8a23109c872f07cd99c0a98afe66f609a534b05660
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for promptledger-openai-compatible 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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