You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Community integration: a Symfony bundle for Jev #9
Sharing a community integration in case it is useful to list, along the lines of the "Community" request in typesafe-sdk-js#7. It is unofficial and not affiliated with TypeSafe.
A typed client for POST /v1/systemone and GET /v1/models on Symfony HttpClient. Retries match the official SDKs: 408/429/5xx with retry-after-ms / Retry-After up to 60 s, and X-TypeSafe-Retry-Count on retries.
Validator constraints, e.g. #[JevNoul('Is this spam?', max: 0.2)] on a form field, and #[JevChoice] with a minimum confidence.
Messenger fan-out, Workflow guards decided by a noul/choice answer, a web-profiler panel (questions, probabilities, confidence, tokens, request ids), and jev:models / jev:ask console commands.
the API key is never echoed into error messages (typesafe-sdk-python#9, typesafe-sdk-js#14).
Covered by 205 tests and PHPStan at max level; CI runs PHP 8.4/8.5 × Symfony 7.4/8.0. A live smoke test against the API runs locally when TYPESAFE_API_KEY is set.
This is an exceptionally well-engineered community integration.
Highlights of the Implementation
Symfony Architectural Fit:
Embedding Jev decisions into Symfony Workflow guards and validator attributes (#[JevNoul], #[JevChoice]) is a natural application pattern for sub-second System One inference. It allows developers to guard state machine transitions with typed AI verdicts without leaving the standard framework lifecycle.
Robust Edge-Case Handling:
Proactively addressing wire contract nuances—such as handling numeric choice keys, normalizing 401/403 authentication error payloads, parsing release_date timestamps, and pre-validating the 10-level score upper bound—makes this client unusually resilient.
Developer Experience:
The inclusion of WebProfiler panels and a deterministic test double for Symfony Flex environments (when@test) enables reproducible testing pipelines.
Also to note: jev-symfony-bundle has been indexed in the community ecosystem directory (yibie/awesome-jev) under Infra / SDKs / Integrations (PR #218) so PHP/Symfony developers can easily discover it!
Community integration: a Symfony bundle for Jev
Sharing a community integration in case it is useful to list, along the lines of the "Community" request in typesafe-sdk-js#7. It is unofficial and not affiliated with TypeSafe.
vbcherepanov/jev-symfony-bundle (Apache-2.0, PHP 8.4+, Symfony 7.4 / 8.x, on Packagist):
POST /v1/systemoneandGET /v1/modelson Symfony HttpClient. Retries match the official SDKs: 408/429/5xx withretry-after-ms/Retry-Afterup to 60 s, andX-TypeSafe-Retry-Counton retries.#[JevNoul('Is this spam?', max: 0.2)]on a form field, and#[JevChoice]with a minimum confidence.jev:models/jev:askconsole commands.when@test.It handles the API details I ran into while building it, several of which I reported here:
detailshapes are parsed (Docs report: request-body validation returns 400, but the API reference documents 422 #1);release_dateis accepted as a date or a timestamp (GET /v1/models: release_date is a full timestamp, but the OpenAPI schema promises YYYY-MM-DD #7);Covered by 205 tests and PHPStan at max level; CI runs PHP 8.4/8.5 × Symfony 7.4/8.0. A live smoke test against the API runs locally when
TYPESAFE_API_KEYis set.