Skip to content

extract or upstream structured JSON model-call utilities #369

@autholykos

Description

@autholykos

Context

Pituitary already implements a useful structured model-call pattern in its analysis provider:

  • serialize a bounded prompt payload;
  • call Stroma chat;
  • normalize JSON response text;
  • decode into a typed target;
  • classify provider/schema errors.

RLM-style products need this on every worker/subcall.

Proposed Capability

Either:

  1. move the generic JSON-call helper down into Stroma and adopt it in Pituitary, or
  2. extract Pituitary's generic JSON-call code into a public product-neutral package.

Acceptance Criteria

  • The helper is not tied to specs/docs.
  • Callers can decode into typed structs.
  • Invalid/missing JSON returns a structured schema-mismatch error.
  • Pituitary's existing provider-backed adjudication tests continue to pass through the shared helper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:runtimeRuntime provider config and contractccd/priority:parkedCCD: on holdneed:feedbackCall for participation: feedback is requested to fix this issuetype:enhancementIssues concerning code or feature improvement (performance, refactoring, etc)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions