Skip to content

fix: rename invalid property keys in get_legal_intakes tool schema (fixes EU clm_connector failures)#67

Draft
sd-gh-bot wants to merge 1 commit into
mainfrom
fix/legal-intakes-tool-schema-invalid-property-keys
Draft

fix: rename invalid property keys in get_legal_intakes tool schema (fixes EU clm_connector failures)#67
sd-gh-bot wants to merge 1 commit into
mainfrom
fix/legal-intakes-tool-schema-invalid-property-keys

Conversation

@sd-gh-bot
Copy link
Copy Markdown
Contributor

@sd-gh-bot sd-gh-bot commented May 13, 2026

User description

Problem

The get_legal_intakes tool schema contained property keys with characters that violate Vertex AI Claude Sonnet 4.5's strict pattern requirement: ^[a-zA-Z0-9_.-]{1,64}$

Invalid keys in the previous schema:

  • filter__priority[$eq], filter__priority[$in], filter__priority[$ne]
  • filter__status[$eq], filter__status[$in], filter__status[$ne]

Characters [, ], and $ are not in the allowed set.

Impact

This caused every clm_connector agent call to fail with HTTP 400 in sidebar-prod-eu (and also regions where claude-sonnet-4-5@20250929 is used). No fallback model was available.

Evidence from GCP logs (sidebar-prod-eu):

Exception in node: clm_connector | error: Error code: 400
tools.18.custom.input_schema.properties: Property keys should match pattern '^[a-zA-Z0-9_.-]{1,64}$'

Affected chat_ids: ecef3457, 1796892a — recurring across the 12h window.

Fix

Rename the invalid property keys to use only alphanumeric + underscore chars. The handler emits the correct API query params so the backend API contract is unchanged.

Validation

  • tsc --noEmit passes cleanly
  • All property keys match the required pattern

Generated description

Below is a concise technical summary of the changes proposed in this PR:
Update the getLegalIntakesTool input schema to rename filter properties to pattern-compliant keys and clarify operator descriptions for each priority and status enum. Adjust the getLegalIntakes request handling so it preserves the existing backend query parameters while using the new request field names.

TopicDetails
Request mapping Maintain the backend query contract by emitting the original [$eq], [$ne], and [$in] params from getLegalIntakes while mapping to the renamed request fields.
Modified files (1)
  • src/tools/legal-intake/get_legal_intakes.ts
Latest Contributors(2)
UserCommitDate
neo@spotdraft.comfix: rename invalid pr...May 13, 2026
vinit@spotdraft.comadded support to get l...April 28, 2026
Schema compliance Rename schema filters to pattern-compliant keys and expand descriptions to highlight allowed values and operator behaviors for the getLegalIntakesTool input schema.
Modified files (1)
  • src/tools/legal-intake/get_legal_intakes.ts
Latest Contributors(2)
UserCommitDate
neo@spotdraft.comfix: rename invalid pr...May 13, 2026
vinit@spotdraft.comadded support to get l...April 28, 2026
Review this PR on Baz | Customize your next review

Claude Sonnet 4.5 on Vertex AI enforces that tool input_schema property
keys match the pattern '^[a-zA-Z0-9_.-]{1,64}$'. The previous schema
had keys like 'filter__priority[$eq]', 'filter__status[$in]' etc.
which contain '[', ']', and '$' — all disallowed characters.

This caused the entire clm_connector node to fail in sidebar-prod-eu
with HTTP 400 'invalid_request_error' and no fallback available.

Changes:
- Rename 'filter__priority[$eq]' → 'filter__priority' (eq is now the default)
- Rename 'filter__priority[$ne]' → 'filter__priority_ne'
- Rename 'filter__priority[$in]' → 'filter__priority_in'
- Rename 'filter__status[$eq]'   → 'filter__status'   (eq is now the default)
- Rename 'filter__status[$ne]'   → 'filter__status_ne'
- Rename 'filter__status[$in]'   → 'filter__status_in'
- Update handler to emit the correct API query param for each renamed key
  (e.g. filter__priority → filter__priority[$eq] in URLSearchParams)

Observed in: sidebar-prod-eu GCP logs, chat_ids ecef3457 and 1796892a
Evidence: tools.18.custom.input_schema.properties: Property keys should
match pattern '^[a-zA-Z0-9_.-]{1,64}$'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s < 100 lines of changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants