Skip to content

[Bug]: @openclaw/feishu bitable write tools emit invalid JSON Schema (empty patternProperties sub-schema) — breaks Anthropic via AWS Bedrock #94547

Description

@TwinsLee

Title

[Bug]: @openclaw/feishu bitable write tools emit invalid JSON Schema (empty patternProperties sub-schema) — breaks Anthropic via AWS Bedrock

Bug type

Schema validation error

Summary

Three bitable write tools in @openclaw/feishu use Type.Record(Type.String(), Type.Any()) which serializes to patternProperties: { "^.*$": {} } (empty sub-schema). This is rejected by AWS Bedrock's strict JSON Schema draft 2020-12 validation, causing all LLM calls to fail when these tools are in the tool list.

Affected tools

  • feishu_bitable_create_recordfields parameter
  • feishu_bitable_update_recordfields parameter
  • feishu_bitable_create_fieldproperty parameter

Steps to reproduce

  1. Install @openclaw/[email protected]
  2. Configure an Anthropic provider that routes through AWS Bedrock (e.g., a corporate proxy)
  3. Send any message to an agent that has these tools enabled
  4. Every LLM call fails with schema validation error

Expected behavior

Tools should emit valid JSON Schema that passes strict validation. Type.Any() should serialize to {} with at minimum "type": "object" or equivalent non-empty schema.

Actual behavior

tools.N.custom.input_schema: JSON schema is invalid

The Anthropic Messages API (via Bedrock) rejects the entire request because patternProperties: { "^.*$": {} } contains an empty sub-schema {}.

Root cause

In dist/api.js:

fields: Type.Record(Type.String(), Type.Any(), { description: "..." })

Serializes to:

{
  "type": "object",
  "patternProperties": {
    "^.*$": {}
  }
}

The empty {} is invalid under strict JSON Schema validation (Bedrock enforces draft 2020-12).

Workaround

Add these tools to tools.deny in agent config:

"tools": {
  "deny": ["feishu_bitable_create_record", "feishu_bitable_update_record", "feishu_bitable_create_field"]
}

Suggested fix

Replace Type.Any() with a non-empty schema, for example:

Type.Record(Type.String(), Type.Unknown())
// or explicitly:
Type.Record(Type.String(), Type.Union([Type.String(), Type.Number(), Type.Boolean(), Type.Array(Type.Any()), Type.Object({})]))

Or apply schema sanitization in the tool registration phase to replace empty {} sub-schemas with { "type": "object" } or similar.

Environment

  • OpenClaw: 2026.6.8
  • @openclaw/feishu: 2026.6.8
  • Provider: Anthropic (via AWS Bedrock corporate proxy)
  • OS: macOS (ARM64)

Impact

P0 for affected users — all agent communication is blocked (not just bitable functionality). The invalid schema in any tool causes the entire tool list to be rejected by the provider.

Notes

  • The Anthropic direct API appears to tolerate empty sub-schemas, so this only manifests when routing through Bedrock or other strict validators.
  • OpenClaw's tool schema normalization covers Gemini, DeepSeek, and OpenAI but has no sanitization pass for Anthropic-bound schemas.
  • Previous version (5.27) had internal normalization that masked this issue; 6.8 apparently removed or changed that behavior.

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions