Validate agent nodes carry a required model id#12
Draft
posthog[bot] wants to merge 1 commit into
Draft
Conversation
validate-graph.js only checked decide-node conditions, so an agent node built via these skills could be saved with no provider_model_id and no early feedback — the exact state the workflow editor later rejects with "Debe seleccionar un modelo de IA" / "AI Model is required". Extend the node loop to error when an agent node is missing config.provider_model_id (pointing at list-provider-models.js), and warn on an empty system_prompt. Surface the model lookup in the Graph rules of SKILL.md and the agent notes in node-types.md so the id is set before the node is saved. Generated-By: PostHog Code Task-Id: b0476de7-24fa-4962-9701-f3132536bc14
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.
Why
Users building WhatsApp workflows keep getting stuck adding an AI Agent node: session replays show them hitting "Debe seleccionar un modelo de IA" / "AI Model is required" and "System Prompt is required" walls, with two sessions abandoned. The agent-config step is essentially un-instrumented, so this friction is invisible in analytics and only shows up in replay.
In this repo
node-types.mddocumentsconfig.provider_model_idas required, butscripts/validate-graph.jsonly validateddecide-node conditions — it never checked agent nodes. So a graph built via these skills could reach the exact state the product UI rejects, with no early feedback.Changes
validate-graph.js: error when anagentnode is missingconfig.provider_model_id(message points atlist-provider-models.js); warn on an emptysystem_prompt. Adds anagentNodesstat.node-types.md/SKILL.md: surfacelist-provider-models.jsand the validation requirement so the model id is set before the node is saved.Bundled agent assets still validate cleanly;
npm run validateandnpm run check:syntaxpass.Out of scope (product-UI team)
Three customer-facing bugs live in the workflow editor, not this repo, and need separate attention:
e12856c0).claude-3-5-sonnet-latest, saving, and finding it silently reverted to the defaultgoogle/gemini-2.5-flash(signale858461c).363c6d29).Created with PostHog Code from an inbox report.