Skip to content

Add decision models with TypeSafe and AIHubMix providers - #129

Open
ruibaby wants to merge 10 commits into
mainfrom
feat/support-jev-decision-models
Open

ruibaby wants to merge 10 commits into
mainfrom
feat/support-jev-decision-models

Conversation

@ruibaby

@ruibaby ruibaby commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Add provider-neutral decision models for evaluating shared text or JSON state
with yes/no probabilities, choices, and ordered scores. Built-in TypeSafe and AIHubMix adapters
provide Jev access through the same public contract.

  • Introduce Java decision APIs and an npm decision client shared by providers.
  • Discover AIHubMix catalog entries with type decision and invoke its
    /v1/systemone endpoint with gateway headers and provider-specific diagnostics.
    Discovery uses catalog metadata rather than hardcoded Jev model names.
  • Accept choice-only and score-only results. Distributions, confidence, and score
    legends are independent optional fields; missing information is never invented.
  • Validate optional fields when present and retain TypeSafe's protocol-required
    fields in its adapter. Confidence semantics remain provider-specific.
  • Expose optional output capabilities for model filtering and display.
  • Attribute Decision workbench calls to AI Foundation, including after
    asynchronous model resolution, using the same caller detection as other models.
  • Integrate model discovery, default model selection, cancellation, timeouts,
    usage recording, and a Console decision workbench.
  • Retain reported token usage and the served model when decision response validation
    fails, while recording both the execution and logical call as failed.
  • Preserve SDK cancellation errors during response-body reads and normalize TypeSafe
    discovery and inference URLs consistently, including proxy path prefixes.
  • Align the Decision workbench with the other test panels: compact content/question
    columns on desktop, stacked fields on narrow screens, and consistent result cards.
  • Regenerate OpenAPI clients and document SDK usage and provider integration.

The initial contract covers YES_NO, CHOICE, and SCORE questions over text/JSON.
YES_NO retains a probability result; boolean-only classifiers can use a
two-option CHOICE. Image and box inputs are not included.

Validation

  • ./gradlew build --rerun-tasks passed, including SDK compilation and UI type checking.
  • Backend: 1,228 tests passed and 1 test skipped.
  • Frontend and SDK: 376 tests passed.
  • ESLint and Oxlint passed for changed frontend sources.
  • Tests cover label-only/score-only results, independently omitted diagnostics,
    malformed optional data, provider capability filtering, and strict TypeSafe
    protocol parsing, AIHubMix discovery-to-inference, gateway headers/errors, and
    service-root or /v1 Base URL normalization, and Console caller attribution.
  • Regression tests cover failed-response usage and model attribution with complete,
    partial, zero, and missing token counts; cancellation during a real HTTP response
    body read; malformed JSON; and TypeSafe discovery/inference URL combinations.
  • ./gradlew build also passed after the workbench layout update.
  • Checked the workbench in a local browser preview at desktop and 390px widths,
    including multiple questions and sample results; this was a component preview
    using Halo's form theme, not a live Console end-to-end test.
  • Verified that the plugin JAR contains the updated workbench assets.

Verified the public AIHubMix catalog contains jev-latest, jev-1.13, and
jev-1.14 as decision models. Protocol tests use a local HTTP server. Console call
records confirm successful AIHubMix Jev 1.14 inference with reported token
usage; live inference with a TypeSafe API key has not been verified.

Compatibility

Existing model APIs and persisted values are retained. New service methods have
default implementations for existing AiModelService implementations. Consumers
of the new decision API must check optional diagnostics for absent or null values.

Decision resources require a runtime and SDK containing this feature. Remove
decision model resources and clear the default decision slot before downgrading
to an older plugin version.

Halo tooling is pinned to 2.26.0. OpenAPI and the API client were regenerated
with that version, removing unrelated version-header changes from the PR.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-28T05:03:05.567774Z
We couldn’t complete this review. Comment @codex review to try again.
ac44585 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@pkg-pr-new

pkg-pr-new Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@halo-dev/ai-foundation-sdk@129

commit: bf64a13

@ruibaby ruibaby changed the title Add Jev decision model support Add decision model support with a TypeSafe provider Oct 28, 2026
Bundle the icon published by https://typesafe.ai and expose it through provider metadata.
@ruibaby ruibaby changed the title Add decision model support with a TypeSafe provider Add decision models with TypeSafe and AIHubMix providers Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant