Metadata-Version: 2.4
Name: voight-check
Version: 0.1.0
Summary: Check whether a model behind any OpenAI-compatible endpoint is ready for coding agents: tool calls, streaming, JSON, long context and prompt caching.
Author: Voight
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/Voightxyz/router/tree/main/python
Project-URL: Source, https://github.com/Voightxyz/router
Keywords: llm,openai,tool calling,agents,claude code,codex,evaluation,router
Classifier: Programming Language :: Python :: 3
Classifier: Environment :: Console
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# voight-check

Is this model ready for coding agents? `voight-check` sends a short set of real requests to any OpenAI-compatible endpoint and reports what Claude Code, Codex, OpenCode and other agents depend on.

```bash
pip install voight-check
export OPENAI_API_KEY=...
voight-check --base-url https://api.your-provider.com/v1 --model your-model-id
```

```
  PASS  chat                0.9 s  answered in 0.9 s
  PASS  streaming           1.1 s  first token after 0.9 s
  PASS  tool_calls          4.5 s  3/3 valid tool calls
  PASS  tool_result         1.2 s  used the tool result in its answer
  PASS  streaming_tools     1.3 s  valid tool call assembled from the stream
  PASS  parallel_tools      2.0 s  2 tool calls in one turn
  PASS  json_output         1.8 s  valid JSON object
  WARN  prompt_cache        1.9 s  no cached tokens reported on an identical repeat

READY for coding agents: needs valid tool calls (90%+), tool results used, and tool calls in streams.
```

That run tested Qwen 3.8 27B on a hosted OpenAI-compatible API with `--runs 3 --cache`.

## What it checks

| Check | What passes |
|---|---|
| `chat` | A plain answer, with token counts in `usage`. |
| `streaming` | Text in the stream, `[DONE]` at the end, and usage in the stream (agents use it to track the context window). |
| `tool_calls` | The same tool request `--runs` times; passes when 90% or more come back as a valid call: the right tool, JSON arguments, the schema's required field, allowed enum values, no unknown fields. Calls written as text are counted and named. |
| `tool_result` | After a tool result, the model answers with it instead of ignoring it or calling the tool again. |
| `streaming_tools` | A valid tool call assembled from a stream, the way agents receive them. |
| `parallel_tools` | Two calls in one turn (a warning when the model makes one call per turn). |
| `json_output` | `response_format: json_object` returns valid JSON (a warning when it is not supported). |
| `long_context` | With `--context TOKENS`: finds a code hidden in the middle of a prompt that size. |
| `prompt_cache` | With `--cache`: an identical repeat reports cached prompt tokens (OpenAI's `cached_tokens` or DeepSeek's `prompt_cache_hit_tokens`). |

"Ready" means `tool_calls`, `tool_result` and `streaming_tools` pass and streaming works.

## Options

```
--base-url URL        OpenAI-compatible base URL (with /v1)
--model ID            model to test
--api-key-env NAME    variable holding the key (default OPENAI_API_KEY; unset = no key)
--runs N              repeats of the tool-call request (default 5)
--context TOKENS      also test recall at about this prompt size
--cache               also check prompt caching
--json PATH           full report as JSON ('-' for standard output)
--timeout SECONDS     per request (default 120)
```

Exit code 0 when the model is ready, 1 when it is not, 2 when the endpoint cannot be reached.

The key is read from an environment variable, never from the command line, and is only sent to `--base-url`. Every check is a real request, so it uses tokens on your account: the default run is about 12 requests.

## With Voight Router

Test the model your agent will see through the router, translation and tool-call repair included:

```bash
npx @voightxyz/router --upstream https://api.your-provider.com/v1 --api-key-env PROVIDER_API_KEY --model your-model-id
voight-check --base-url http://127.0.0.1:4000/v1 --model your-model-id
```

No dependencies: Python 3.10 or later, standard library only.
