Skip to content

Commit 740fda1

Browse files
feat: add activity processor tag extraction thresholds (#339)
## Ticket - https://linear.app/stream/issue/FEEDS-1792/make-activity-processor-tag-extraction-thresholds-configurable ## Summary Regenerates `src/gen` from the chat OpenAPI spec to pick up two new optional fields on `ActivityProcessorConfig`: ```ts min_text_length?: number; min_word_count?: number; ``` They let a feed group gate `text_interest_tags` extraction on how much text an activity actually has. Today there is no gate at all — a one-character activity triggers a full LLM call and whatever topics the model invents land in `interest_tags`, which is what a customer reported as junk tags. Both fields default to `0` (disabled), so existing behaviour is unchanged and the knob is opt-in. ## Notes for review **Branch name matches the chat branch on purpose.** `tests/qa/Makefile` resolves `VIDEO_JS_SERVER_SDK_BRANCH` by looking for a `stream-node` branch with the same name as the chat branch, and swaps `@stream-io/node-sdk` to it for the QA run. That is how [GetStream/chat#16074](GetStream/chat#16074 QA tests exercise `min_text_length` / `min_word_count` before this SDK is released. (This PR supersedes #338, which sat on a non-matching branch name.) The regeneration diff is **only** those 10 lines — `src/gen` was already in sync with master, so nothing unrelated came along. Both fields are optional, so this is additive and backwards compatible: existing callers constructing an `ActivityProcessorConfig` keep compiling untouched. ## Verification - `yarn generate:open-api` — regenerated, diff scoped to `ActivityProcessorConfig` - `yarn build` — clean - `yarn lint` — clean, no new warnings - `yarn test` — 18 failed / 3 passed / 3 skipped, **identical to `main`**. Every failure is `secretOrPrivateKey must have a value` from missing `STREAM_API_SECRET` locally; verified by stashing the change and re-running. A type-only addition cannot affect these. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 7288528 commit 740fda1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/gen/models/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,16 @@ export interface ActivityProcessorConfig {
595595
* Type of activity processor (required)
596596
*/
597597
type: string;
598+
599+
/**
600+
* Minimum number of characters the activity text must have before this processor runs. 0 (the default) disables the check. Only applies to text_interest_tags.
601+
*/
602+
min_text_length?: number;
603+
604+
/**
605+
* Minimum number of words the activity text must have before this processor runs. 0 (the default) disables the check. Only applies to text_interest_tags.
606+
*/
607+
min_word_count?: number;
598608
}
599609

600610
export interface ActivityReactionAddedEvent {

0 commit comments

Comments
 (0)