Skip to content

typesafe-go

Dependency-free unofficial Go SDK for System One calls and model discovery, with retries and typed errors.

LibrarybetaMIT

Overview

typesafe-go is an unofficial, MIT-licensed Go client for TypeSafe's v1 API, covering System One calls and model discovery with no third-party dependencies. It requires Go 1.23+. State can be any JSON-shaped value, and questions are built with Noul, Choice and Score helpers; answers are read with NoulAnswer, ChoiceAnswer and ScoreAnswer.

Configuration comes from TYPESAFE_API_KEY, TYPESAFE_BASE_URL and TYPESAFE_DEFAULT_MODEL or client options, which also control retries, HTTP transport and maximum response size. Transient failures are retried per policy, Retry-After is honored, canceled contexts are never retried, and typed HTTP errors include status, headers, request ID and a bounded body. Releases follow semantic versioning from conventional commits. Request options can override settings such as the model for a single call without changing the client, and every successful response exposes a request ID for tracing.

What the decision model decides

TypeQuestionAnswers
Yes / noIs the draft safe to send?yes · no
ChoiceWhich audience should receive the draft?engineering · customers
ScoreHow feasible is shipping the migration on Friday?Not feasible · At risk · Feasible

How it works

  1. Create a client with NewClient.
  2. Call SystemOne with state and questions.
  3. Read typed answers and the request ID.
  4. Handle typed errors and retries as configured.

Strengths

  • No third-party dependencies.
  • Respects Retry-After and context cancellation.
  • Detailed typed errors for diagnostics.

Caveats

  • Unofficial.
  • Requires a TypeSafe key.

Getting started

go get github.com/zhirschtritt/typesafe-go

At a glance

Type
Library
Status
beta
Language
Go
Runtime
library
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

What Go version is needed?

Go 1.23 or later.

Does it have dependencies?

No third-party dependencies.

Can I override the model per request?

Yes, request options can override request-scoped settings such as the model.

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