Skip to content

typesafe-client (haileyok)

Unofficial Go and Rust clients for System One that mirror the official SDKs' retries, errors, validation and gateway support.

Librarybeta

Overview

This repository provides two unofficial clients for TypeSafe's System One API: a standard-library-only Go module (Go 1.22+) and an async Rust crate, typesafe-system-one, built on reqwest. Both aim to bring the official Python and JavaScript SDK behavior to Go and Rust.

That includes typed questions and answers with structured instructions and ordered Choice options; configuration from TYPESAFE_API_KEY, base URL, default model and log level; the official retry policy for 408, 429, 5xx (including 529), connection failures and timeouts with backoff, jitter and Retry-After; typed errors with request IDs; response validation with dotted field paths that passes future answer types through; model listing; gateway support for OpenRouter, Vercel AI Gateway or your own proxy; and logging with credentials redacted.

What the decision model decides

TypeQuestionAnswers
Yes / noIs this true?yes · no
ChoiceWhich of these options?—
ScoreWhich level on this scale?—

How it works

  1. Install the Go module or Rust crate.
  2. Set TYPESAFE_API_KEY.
  3. Send state with typed questions.
  4. Read validated typed answers.

Strengths

  • Matches official SDK retry and error behavior.
  • Go client has no third-party dependencies.
  • Works with gateways and proxies.
  • Forward-compatible response validation.

Caveats

  • Unofficial.
  • Requires a TypeSafe or gateway key.

Getting started

go get github.com/haileyok/typesafe-client/go@latest  or  cargo add typesafe-system-one

At a glance

Type
Library
Status
beta
Language
Go, Rust
Runtime
libraries
Has code
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

Which languages are covered?

Go and Rust.

Do they support OpenRouter?

Yes, gateway support includes OpenRouter, Vercel AI Gateway and custom proxies.

How are retries handled?

Using the official SDKs' policy with backoff, jitter and Retry-After.

Related projects

  • Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.

    MCP serverproductionTypeScript
  • Ax, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.

    PluginproductionTypeScript
  • Effect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.

    ProjectproductionTypeScript
  • PHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.

    ProjectproductionPHP
  • Go MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.

    MCP serverproductionGo
  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython