Installation issues
”No module named ‘qwed_open_responses’”
Cause: Package not installed Solution:“ImportError: langchain not found”
Cause: Missing optional dependency Solution:Guard failures
”No guards configured”
Cause:verify() was called with zero guards. Verification fails closed: verified=False, and blocked=True in strict mode. Earlier versions returned verified=True here. VerifiedOpenAI created without guards also emits a UserWarning at construction for the same reason.
Solution: Configure at least one guard.
”verify_structured_output requires a JSON schema or at least one guard”
Cause:verify_structured_output() was called with neither schema nor guards. It raises ValueError because the call would verify nothing.
Solution: Pass a schema, at least one guard, or both. An explicit empty schema {} is accepted and matches anything.
”Cannot parse JSON response of type … Expected object”
Cause:verify() received a string that parses to a JSON scalar, array, or null. These are rejected with ValueError because an array or scalar payload would bypass per-item guard inspection. Plain non-JSON strings are still accepted and wrapped as text.
Solution: Pass the response as a JSON object (or a string that parses to one). Wrap arrays in an object envelope such as {"output": [...]}.
Verification passed but warnings is non-empty
Cause: A guard returned a warning-severity result. Warnings pass the guard and do not fail verified on their own. They surface in result.warnings as a separate visible state.
Solution: This is expected. To escalate warnings to failures, create the verifier with allow_warnings=False.
”SchemaGuard: Missing required field”
Cause: Output doesn’t match expected schema Debug:- Check field names (case-sensitive)
- Ensure all required fields are present
- Verify types match schema
”ToolGuard: Tool in blocklist”
Cause: Agent tried to call a blocked tool Debug:- Remove tool from blocklist if safe
- Use whitelist instead
- Create exception for specific cases
”ToolGuard: tool-like content in an unrecognized format”
Cause: The response contains something that looks like a tool call, but it matches none of the recognized envelope shapes. ToolGuard blocks it rather than passing with “No tool calls”. Recognized shapes:type=tool_call, type=function_call, tool_calls[], choices[].message.tool_calls[], content[].type=tool_use.
Fix: Emit tool calls in one of the recognized shapes. This block also fires when a call’s JSON-encoded arguments cannot be parsed, exceed 10,000 characters, or nest deeper than 128 levels.
”ToolGuard: malformed tool-call entry”
Cause: Atool_calls, choices, or content collection contains a non-object item, or the response mixes a direct tool call (type=tool_call/function_call) with a sibling collection. Ambiguous envelopes are blocked because validating one side would let the other escape policy checks.
Fix: Every entry in a tool-call collection must be an object with a non-blank string tool name, and a response must carry its tool calls in exactly one place.
”MathGuard: No verifiable math found in response”
Cause: The response contains no verifiable math shape. Prose, plain strings, and objects without recognized total, percentage, or inline-calculation fields no longer pass MathGuard vacuously. The guard fails with a warning-severity result, which blocks in strict mode. Options:- Remove MathGuard from stacks that verify non-math responses
- Keep the default
allow_warnings=Trueon the verifier so the warning surfaces inresult.warningswithout failing verification - Add a custom rule so the response shape becomes verifiable
”MathGuard: Calculation mismatch”
Cause: LLM provided wrong calculation Debug:- Return error to user
- Retry with corrected prompt
- Use QWED’s math engine directly
”SafetyGuard: PII detected”
Cause: Response contains personally identifiable information Patterns detected:- SSN:
\d{3}-\d{2}-\d{4} - Credit Card:
\d{16} - Email: Standard email pattern
- Phone: Various formats
- Block (default): Return error
- Redact: Replace with
[REDACTED] - Custom patterns: Add your own
”StateGuard: Invalid transition”
Cause: Trying to move to invalid state Debug:Integration issues
LangChain callback not triggering
Check callback is added:OpenAI wrapper not verifying
Check you’re using VerifiedOpenAI:Guards not being applied
Check guard order:Performance issues
Verification is slow
Reduce guards:Too many false positives
Tune PII patterns:Common errors reference
Getting help
- GitHub Issues: github.com/QWED-AI/qwed-open-responses/issues
- Documentation: docs.qwedai.com/open-responses
- Examples: GitHub Examples