fix(feishu): allow number/boolean/array types in bitable fields parameter#96758
fix(feishu): allow number/boolean/array types in bitable fields parameter#96758infomachalonfitness wants to merge 1 commit into
Conversation
…eter
The fields parameter in CreateRecordSchema and UpdateRecordSchema
uses Type.Any() which serializes to an empty JSON Schema {}.
This makes the LLM default to passing all values as strings,
even for numeric fields where number type is expected.
Change Type.Any() to Type.Union([...]) so the JSON Schema
explicitly advertises type: [string,number,boolean,array,object],
allowing the LLM to correctly pass number/boolean/array values.
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the Feishu bitable Bedrock schema bug is real and still present on main, but this PR is a narrower duplicate of #94990, which is open, mergeable, proof-positive, and covers all three affected schemas with regression coverage. 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 canonical Feishu-local non-empty JSON-value schema repair, preferably #94990, then close duplicate sibling PRs and the linked issue from that merge. So I’m closing this here and keeping the remaining discussion on #94990. Review detailsBest possible solution: Land exactly one canonical Feishu-local non-empty JSON-value schema repair, preferably #94990, then close duplicate sibling PRs and the linked issue from that merge. Do we have a high-confidence way to reproduce the issue? Yes, source-level: current main and Is this the best way to solve the issue? No. This PR is a plausible partial repair, but it is not the best landing path because it covers only two affected top-level maps and keeps nested empty Security review: Security review cleared: Cleared: the diff changes only Feishu TypeBox schema declarations and does not touch dependencies, workflows, secrets, permissions, 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 69af58ba2613. |
Problem
The
fieldsparameter inCreateRecordSchemaandUpdateRecordSchemausesType.Any()which serializes to an empty JSON Schema{}. This makes the LLM default to passing all values as strings, even for numeric fields wherenumbertype is expected.For example, the LLM passes
{"Price": "99"}instead of{"Price": 99}, causing type mismatches in the Bitable API.Fix
Change
Type.Any()toType.Union([Type.String(), Type.Number(), Type.Boolean(), Type.Array(Type.Any()), Type.Record(Type.String(), Type.Any())])so the JSON Schema explicitly advertises"type": ["string", "number", "boolean", "array", "object"].Changes
CreateRecordSchema.fields(line 533):Type.Any()→ explicit union typeUpdateRecordSchema.fields(line 575): same changeBoth
propertyinCreateFieldSchemakeepsType.Any()as-is, since field creation properties have field-type-specific structures that are too varied to constrain.