fix(feishu): replace Type.Any() with explicit AnyJsonValue schema for Bedrock compatibility#95276
fix(feishu): replace Type.Any() with explicit AnyJsonValue schema for Bedrock compatibility#95276qingminglong wants to merge 1 commit into
Conversation
Type.Any() 序列化为空 {},被 AWS Bedrock 严格 draft 2020-12 校验拒
绝。替换为 Type.Unsafe() 的显式 anyOf 定义(string/number/boolean/
null/array/object)。
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the Feishu/Bedrock schema bug is real, but #94990 is already the stronger open canonical fix for the same three provider-visible schemas, with registered-tool regression coverage and proof marked sufficient. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Land exactly one Feishu-local schema repair through #94990, then close the duplicate sibling PRs and let the linked issue close from the merged fix. So I’m closing this here and keeping the remaining discussion on #94990. Review detailsBest possible solution: Land exactly one Feishu-local schema repair through #94990, then close the duplicate sibling PRs and let the linked issue close from the merged fix. Do we have a high-confidence way to reproduce the issue? Yes, source-level: current main and v2026.6.8 still emit the three Is this the best way to solve the issue? No. This PR is a plausible narrow repair, but #94990 is the better canonical landing path because it fixes the same schemas with registered-tool coverage and avoids this branch's provider-visible Security review: Security review cleared: The diff changes one Feishu TypeBox schema file only, with no changes to secrets, permissions, dependency sources, workflows, package metadata, or code execution paths. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against a1271830948b. |
|
/clawsweeper |
|
please help to merge,thanks |
Summary
Fix three bitable write tools that use
Type.Record(Type.String(), Type.Any())which serializes to empty{}sub-schema, rejected by AWS Bedrock strict draft 2020-12 validation.Changes
AnyJsonValueschema (Type.Unsafe<any>({ anyOf: [string, number, boolean, null, array, object] }))Type.Any()inCreateRecordSchema.fields,CreateFieldSchema.property,UpdateRecordSchema.fieldsRelated issue
Closes #94547
Real behavior proof
Behavior addressed: Type.Any() 序列化为空
{}被 AWS Bedrock strict draft 2020-12 拒绝Real environment tested: Linux 4.19.112, Node v22.18.0, typebox
Before-fix evidence:
空
{}patternProperties 子 schema 不满足 draft 2020-12 的 anyOf/type 约束。Exact steps or command run after this patch:
After-fix evidence:
patternProperties 子 schema 包含明确的 anyOf,符合 strict draft 2020-12。
Observed result after the fix: 三处 Type.Any()(CreateRecordSchema.fields、CreateFieldSchema.property、UpdateRecordSchema.fields)全部替换为 AnyJsonValue,工具 schema 不再被 AWS Bedrock 拒绝。
What was not tested: 未在包含 AWS Bedrock 的实际环境中验证(缺少 Bedrock 凭证)。schema 序列化对比确认了修复效果。