v0.6.2 — Provider Contract Certification
v0.6.2 — Provider Contract & Integration Certification
🐛 Bug Fixed
OpenAI adapter complete() crash on non-JSON responses — res.json() on non-JSON body threw SyntaxError. Now gracefully returns empty string.
🔌 Provider Contract Certified
116 contract tests verify that every adapter produces consistent canonical output:
| What was tested | How many tests |
|---|---|
| AIProvider contract compliance | 12 |
| Canonical response (complete) | 8 |
| Canonical response (stream) | 3 |
| complete() errors across all 6 providers | 18 |
| complete() edge cases | 3 |
| stream() errors across all 6 providers | 12 |
| Tool calling (native + text-embedded + malformed) | 4 |
| Error normalization (status, provider, body) | 18 |
| Timeout behavior (complete + stream) | 12 |
| Malformed/adversarial responses | 4 |
| Provider isolation | 2 |
| Failure injection (HTTP 400-503) | 20 |
Provider Matrix
| Provider | complete() | stream() | Tools | Errors | Timeout | Status |
|---|---|---|---|---|---|---|
| OpenAI | ✅ PASS | ✅ PASS | ✅ PASS | ✅ PASS | ✅ PASS | ✅ |
| Anthropic | ✅ PASS | ✅ PASS | ✅ PASS | ✅ PASS | ✅ PASS | ✅ |
| Google GenAI | ✅ PASS | ✅ PASS | — | ✅ PASS | ✅ PASS | ✅ |
| Azure | ✅ PASS | ✅ PASS | — | ✅ PASS | ✅ PASS | ✅ |
| Groq | ✅ PASS | ✅ PASS | — | ✅ PASS | ✅ PASS | ✅ |
| Ollama | ✅ PASS | ✅ PASS | — | ✅ PASS | ✅ PASS | ✅ |
391 Tests Passing
116 new contract tests added (275 → 391 total).
Package Verified
- 183 files
- 93.5 kB compressed
- Zero runtime dependencies
- Clean install verified from tarball
- All subpath imports resolve
Changelog: https://github.com/Hilbras/Hilbras-ai-sdk/blob/main/CHANGELOG.md