Skip to content

fix(slack-bot): migrate to AI SDK v6 + add #N idea reference#24

Merged
superterran merged 1 commit intomainfrom
fix/slack-bot-ai-sdk-v6
May 4, 2026
Merged

fix(slack-bot): migrate to AI SDK v6 + add #N idea reference#24
superterran merged 1 commit intomainfrom
fix/slack-bot-ai-sdk-v6

Conversation

@superterran
Copy link
Copy Markdown
Contributor

Summary

  • Bug fix: tool calls were failing with tools.0.custom.input_schema.type: Field required because the slack-bot uses ai@^6 but still had v4-era parameters: / .args / maxSteps API. Migrated to v5+ (inputSchema: / .input / stopWhen: stepCountIs()).
  • New: reply to a Looper-posted idea thread 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. Persists thread context after, so follow-up replies don't need the number again.

Test plan

  • Merge to trigger deploy-slack-bot.yml
  • Reply in an existing Looper thread with #3 your stance should be …
  • Verify the bot posts ✅ Updated #3 — *<title>* plus the new draft body in-thread
  • Verify a follow-up reply in the same thread (no #N) lands on the same PR

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>
@superterran superterran merged commit 68a31bb into main May 4, 2026
1 check passed
@superterran superterran deleted the fix/slack-bot-ai-sdk-v6 branch May 4, 2026 17:17
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