Skip to content

fix(telegram): allow agentId in account config for multi-account routing#2182

Open
BingqingLyu wants to merge 5 commits into
mainfrom
fork-pr-63380-fix-telegram-account-agentid
Open

fix(telegram): allow agentId in account config for multi-account routing#2182
BingqingLyu wants to merge 5 commits into
mainfrom
fork-pr-63380-fix-telegram-account-agentid

Conversation

@BingqingLyu

@BingqingLyu BingqingLyu commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes regression where Telegram multi-account configs with agentId were rejected as 'must NOT have additional properties' after upgrading from 2026.4.5 to 2026.4.8.

Root cause

agentId was only defined in TelegramTopicSchema (for forum group topic routing), not in TelegramAccountSchemaBase. The .strict() Zod modifier generates additionalProperties: false in JSON Schema, causing account configs with agentId to fail validation.

Changes

  • src/config/types.telegram.ts: Added agentId?: string to TelegramAccountConfig type
  • src/config/zod-schema.providers-core.ts: Added agentId: z.string().optional() to TelegramAccountSchemaBase Zod schema (after enabled field)
  • src/config/config.telegram-topic-agentid.test.ts: Added regression test for agentId in account config

Testing

  • Isolated Zod schema validation confirms: account with agentId now passes, multi-account config (6 accounts each with agentId) passes, backward compatibility preserved

Fixes openclaw#62985

mraleko added 5 commits April 11, 2026 03:04
Allows agentId in channels.telegram.accounts.<id> for per-account agent
routing in multi-account setups. Fixes regression where upgrading from
2026.4.5 to 2026.4.8 caused 'must NOT have additional properties' errors
for accounts with agentId configured.
Resolves Greptile P2 review comment: test was nested inside
telegram disableAudioPreflight schema block (semantically unrelated).
Now in dedicated describe("telegram account agentId schema") block.
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.

[Bug]: Telegram multi-account config error

2 participants