Skip to content

feat(adapter/typed-decision-local): local model backend for contract:typed-decision (llama.cpp / Ollama / vLLM) #1431

Description

@onlyarnav

Goal: A local-model backend adapter for \contract:typed-decision\ (\ ools/typed-decision/), supporting llama.cpp, Ollama, or vLLM endpoints.

Why: PR #1402 introduced the \contract:typed-decision\ interface with TypeSafe Jev API as the initial cloud backend. Providing a local-model backend enables offline, zero-egress structured decisions without third-party network calls and establishes a second independent backend for vendor neutrality.

What it needs to do (see \ ools/typed-decision/tool.md\ § Interface):

  • Implement \DecisionProvider\ (\choice, \score,
    oul) against local OpenAI-compatible or Ollama endpoints (e.g. \http://localhost:11434/v1\ or \http://localhost:8080/v1\).
  • Support structured outputs via JSON schema or constrained grammars (e.g. GBNF) for discrete choice selection and bounded scale evaluation.
  • Strictly adhere to \TypedDecisionUnavailable\ fail-open semantics on connection, timeout, or schema failure.

References: \ ools/typed-decision/tool.md, \docs/adapters/registry.md, \docs/vendor-neutrality.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions