Troubleshooting
Common issues and solutions when using QWED Open Responses.Installation Issues
”No module named ‘qwed_open_responses’”
Cause: Package not installed Solution:“ImportError: langchain not found”
Cause: Missing optional dependency Solution:Guard Failures
”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
”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
| Error | Guard | Cause | Fix |
|---|---|---|---|
| ”Missing required field” | Schema | Output missing field | Check schema |
| ”Tool in blocklist” | Tool | Dangerous tool called | Review blocklist |
| ”Calculation mismatch” | Math | LLM math wrong | This is intentional! |
| ”PII detected” | Safety | SSN/email in output | Redact or edit prompt |
| ”Invalid transition” | State | Bad state flow | Fix state machine |
| ”Budget exceeded” | Safety | Too many calls | Increase limit |
| ”Argument type error” | Argument | Wrong type | Fix tool schema |
Getting Help
- GitHub Issues: github.com/QWED-AI/qwed-open-responses/issues
- Documentation: docs.qwedai.com/open-responses
- Examples: GitHub Examples