fix(slack-bot): migrate to AI SDK v6 + add #N idea reference#24
Merged
superterran merged 1 commit intomainfrom May 4, 2026
Merged
fix(slack-bot): migrate to AI SDK v6 + add #N idea reference#24superterran merged 1 commit intomainfrom
superterran merged 1 commit intomainfrom
Conversation
The Anthropic API was rejecting tool calls with "tools.0.custom.input_schema.type: Field required" because the v4 `parameters:`/`args` API was being passed to ai@^6, which silently ignored the schema. Updated all tool definitions to v5+ (`inputSchema:` + `.input`) and replaced `maxSteps` with `stopWhen: stepCountIs()` so the post-creator agent loop runs to completion. Also added a #N shortcut for replying to Looper-posted idea threads: leading with "#3", "for #1", "idea 2", etc. resolves to the Nth draft PR in the most recent batch (grouped by date prefix in the blog/YYYY-MM-DD-... branch name) and routes through the existing updateBlogPost flow. Thread context is then persisted so follow-up replies in the same thread don't need the number again. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Summary
tools.0.custom.input_schema.type: Field requiredbecause the slack-bot usesai@^6but still had v4-eraparameters:/.args/maxStepsAPI. Migrated to v5+ (inputSchema:/.input/stopWhen: stepCountIs()).#3 …,for #1 …,idea 2 …, etc. — resolves to the Nth draft PR in the most recent batch (grouped by date prefix in theblog/YYYY-MM-DD-…branch name) and routes through the existingupdateBlogPostflow. Persists thread context after, so follow-up replies don't need the number again.Test plan
deploy-slack-bot.yml#3 your stance should be …✅ Updated #3 — *<title>*plus the new draft body in-thread#N) lands on the same PR