Jev Troubleshooting: From Error to Fix
“It does not run” and “it makes the wrong decision” are different problems. The first requires checking the environment and request path. The second requires inspecting evidence, questions and policy. Mixing them can leave you rewriting a rubric while no API call is actually succeeding.
Find the failing layer with the shortest path
Run one offline case first. Confirm that Python imports the package, reads its sample and writes a result. Then make one small real request to check account access, networking and request shape. Only then try the full batch. Keep the last successful sample as you add each layer.
python -m examples.hello_jev tickets --mode offline
Run this from the extracted project root, where the examples/ directory is visible. If Python cannot find the module, check your directory and interpreter before installing an unrelated package with a similar name.
| Symptom | First check | Confirmation |
|---|---|---|
| Python command not found | Installation and command name | Version command succeeds |
| examples module not found | Current directory | Offline case writes a result |
| Key not configured | Current process environment | Check presence without printing value |
| Cannot write output | Destination and permissions | Use a directory you own |
| Invalid JSON | Encoding, quotes, trailing commas | Standard JSON parser accepts it |
When several Python installations exist, use the interpreter that created the virtual environment and activate that environment. The label in a terminal prompt is not a substitute for checking the actual interpreter path.
Authentication errors do not require a new question
Live mode needs an account with access and a valid API key. Environment variables are inherited by child processes. Setting one in a terminal does not update a different terminal or an editor that is already running.
Check presence without revealing the value:
import os
print("Key configured:", bool(os.environ.get("TYPESAFE_API_KEY")))
The .env.example file is a configuration template. Python's standard library does not automatically load a file called .env. The commands in this package read the process environment; follow the run instructions to set it. Keep keys out of screenshots, public repositories and support tickets.
Match the HTTP status to the next action
The official API documents these common statuses. Consult the actual response and the current API reference when diagnosing a live integration.
| Status | Meaning | Next step |
|---|---|---|
| 401 | Missing or invalid authentication | Check key and Bearer header |
| 422 | Invalid request structure | Inspect fields and question types |
| 429 | Rate limit exceeded | Reduce concurrency and back off |
| 529 | Temporary service overload | Preserve input and retry within a limit |
Authentication and validation errors generally need a configuration or payload change. Repeating the same invalid request immediately is unlikely to help. Rate limiting and overload may recover, but retries still need a limit. Respect any waiting guidance supplied by the service and return a clear failure when the attempt budget is exhausted.
Direct HTTP calls and an official SDK may have different default retry behavior. Inspect the client you are actually using. An outer application retry loop can multiply an SDK's internal retries. A timeout means the client did not receive a complete response in time; it does not prove that the server never processed or billed the request.
Reduce a validation problem to one question
For a 422 response, start with a short state and a single Noul question. Once that succeeds, add Choice, Score and other fields one at a time. You are looking for the smallest change that introduces the failure.
Check that questions is a mapping, that each question has a valid type and a complete instruction, that Choice criteria map option names to descriptions, and that Score criteria form an ordered list. Put application material in state. Do not paste another provider's chat messages payload into this endpoint.
The example package also validates responses. Missing or malformed answers should produce an error or review path. Do not replace a missing numeric answer with zero and continue: zero is a meaningful negative answer for Noul, not a marker for a failed request.
The request succeeds, but the judgment is wrong
Work through these checks in order and change one thing at a time:
- Evidence: did you supply the facts needed to decide, without irrelevant history?
- Scope: does the instruction identify the material being judged?
- Rubric: do options overlap, or do levels lack observable differences?
- Policy: does the program interpret polarity, score range and review conditions correctly?
- Reference: is the expected answer supported by a consistent human rule?
Suppose an article with no usable procedure passes your steps check. If the question only asks whether a numbered list exists, the implementation may be faithfully enforcing the wrong rule. A list can contain opinions. Revise the criterion to require actions a reader can perform in sequence, then check the change on development examples.
If a question asks the model to infer order ownership without trusted ownership data, the design needs to change. Check permissions in code using authenticated identity and order records. A more forceful natural-language instruction cannot supply missing authorization facts.
Why does editing an offline input stop the replay?
Offline mode reads authored teaching responses. It does not understand new text or generate answers for new examples. The package checks a fingerprint of the state and questions. When they change, it refuses to replay the old response, preventing stale numbers from appearing to be judgments about new material.
For a new offline test, define the expected behavior, response scenario and matching fingerprint together. Restore the original sample to rerun the existing demonstration. To observe how the model reacts to new material, use live mode with valid access. Keep those two paths visibly separate in reports and demonstrations.
Save a small reproduction package
A useful issue report includes the Python version, exact command, sample ID, requested model, error type or status, expected behavior and a minimal input with sensitive details removed. It should not include complete environment variables, authorization headers or a large dump of customer records.
Reproduce the issue with the smallest sample before sending it to a maintainer or provider support. When a fix is complete, retain that sample as a regression test. The next time something breaks, you will have a faster way to distinguish an environment problem, an API change and an application change.