Add self-hosted CoPE model support to Zentropi integration - #806
Draft
reitblatt wants to merge 7 commits into
Draft
Add self-hosted CoPE model support to Zentropi integration#806reitblatt wants to merge 7 commits into
reitblatt wants to merge 7 commits into
Conversation
…oostorg#751) Adds the ability to run a vLLM-served CoPE model as an alternative to the Zentropi hosted API, without adding a new signal type. Users choose between hosted mode (API key + labeler_version_id) and self-hosted mode (base URL, model name, and format) in the Zentropi integration settings. Two self-hosted formats are supported: - cope: vLLM /v1/completions with the CoPE fixed-prompt template - openai_chat: configurable chat completions with {criteria}/{content} templates Score extraction uses logprobs in both cases, producing 0–1 output matching the Zentropi hosted scale. Shared openaiCompatibleUtils module is factored for reuse in future self-hosted integrations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d rules (roostorg#751) When Zentropi is configured in self-hosted mode, the rule builder now shows a free-text textarea to enter policy criteria, rather than the standard subcategory gallery. Hosted mode continues to show labeler versions as a dropdown. Also removes temporary debug logging from zentropiUtils. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…storg#751) Policies created via the tiptap editor store empty state as "<p></p>" rather than null. This passes the policyText truthiness filter but strips to an empty string, which would produce meaningless classifier criteria. Fix in two places: - resolvePolicyCriteria now throws a SignalPermanentError if the HTML-stripped criteria text is empty, rather than silently passing "" to the self-hosted model endpoint. - eligibleSubcategories filter now also strips HTML before filtering, so policies with HTML-only text never appear in the policy picker and can't be selected as signal criteria. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…criteria (roostorg#751) Self-hosted Zentropi rules can now use an existing org policy object as classifier criteria instead of free text: - Signal subcategory gallery shows a Radio toggle between "Existing Policy" (Select dropdown) and "Custom Text" (textarea) when the org has at least one policy with usable text. - Selecting a policy stores subcategory as "policy:<id>"; the server resolves this to the policy's stripped policyText at signal run time. - Condition display shows the policy name (not the raw ID) when a policy reference is stored. - When a policy is chosen as criteria and no policies are assigned to the rule yet, policyIds is auto-populated with that policy's ID. - ZentropiLabelerSignal now accepts a getPolicyText callback (injected via instantiateBuiltInSignals) that fetches policyText from ModerationConfigService at run time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix email validation in invite user form The invite form accepted comma-separated email lists and didn't surface why the submit button was disabled. This fixes three things: - Thread the `type` prop through CoopInput to the underlying <input> - Validate email format client-side (rejecting commas, which were the original bug vector) and mark the field red when invalid - Show a contextual tooltip on the disabled submit button explaining what's missing (no email, invalid email, or no role selected) Fixes roostorg#411 * Destructure value for consistency, add aria-invalid for a11y
* fix: don't hide empty threads * code review fixes * code review fixes --------- Co-authored-by: Juan Mrad <juansmrad@gmail.com>
…pe casts (roostorg#666) * refactor: migrate CoreSignal to GQLSignal, remove redundant client type casts * fix: address Copilot and CodeRabbit review comments * fix: address Copilot review pass * code review fixes * fix code review. add missing test --------- Co-authored-by: Juan Mrad <juansmrad@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #751
Summary
selfHostedconfig fields (format, baseUrl, model, optional apiKey, prompt templates) stored in a newself_hosted_*column set on thezentropi_configstablelabeler_version_id; self-hosted calls an OpenAI-compatible completions or chat endpoint with configurable prompt templatesTest plan
copeformat (completions endpoint) andopenai_chatformat (chat/completions endpoint) both workcd server && npm test🤖 Generated with Claude Code