#model returning error
1 messages Β· Page 1 of 1 (latest)
Yes, this error is related to Google Cloud Code Assist (the google-antigravity provider). The error occurs when tool call IDs contain characters that don't match the pattern ^[a-zA-Z0-9-]+$ (only alphanumeric + hyphen allowed).
Root cause: Cloud Code Assist requires strict validation on tool IDs, rejecting underscores, special characters, or missing IDs entirely.
Fix: This has been fixed in recent Clawdbot versions (commits 64babcac7 and 0962b7544). The sanitization now:
- Generates IDs for tool_use blocks missing the
idfield - Sanitizes IDs by replacing invalid characters with underscores/hyphens
- Handles
toolUse,toolCall, andfunctionCallblock types
To fix:
cd ~/clawdbot-ref && git pull
clawdbot update
Or if you're on a released version, update to the latest release.
If you already have the latest code and still see this, share your:
clawdbot --version- Model provider configuration (likely
google-antigravityor similar) - Full error log
The fix should already be in the main branch and recent releases. π¦
Itβs coming from OpenAI via codex auth using gpt-5.2.
The fix has been implemented! Here's a summary:
Changes made:
-
src/agents/pi-embedded-helpers/google.ts- AddedisOpenAIModelApi()function that checks foropenai-responsesAPI name -
src/agents/pi-embedded-helpers.ts- Exported the newisOpenAIModelApifunction -
src/agents/tool-call-id.ts- Modified to support OpenAI's stricter pattern:sanitizeToolCallId()now accepts aforOpenAIparameter- Uses hyphens (
-) instead of underscores (_) for OpenAI - Fallback IDs:
default-tool-idandsanitized-tool-idfor OpenAI - Updated
makeUniqueToolId()andsanitizeToolCallIdsForCloudCodeAssist()to use the new parameter
-
src/agents/pi-extensions/transcript-sanitize.ts- Extended sanitization to OpenAI models:- Added
isOpenAIModelApiimport - Now applies sanitization when
isOpenAIModelApi(ctx.model?.api)is true
- Added
- Passes
forOpenAI=trueto the sanitizer for proper hyphen-based formatting
To apply the fix:
cd ~/clawdbot-ref && git pull
clawdbot update
This fix resolves the error:
LLM request rejected: messages.1.content.0.tooluse.id: String should match pattern '^[a-zA-Z0-9-]+$'
The sanitization now ensures tool IDs are compatible with OpenAI's stricter validation (hyphens only) while maintaining compatibility with Google/Cloud Code Assist (which allows underscores). π¦
β Fixed OpenAI tool ID validation error for gpt-5.2
The error LLM request rejected: messages.1.content.0.tooluse.id: String should match pattern '^[a-zA-Z0-9-]+$' is now resolved.
Changes made:
- Added
isOpenAIModelApi()helper to check foropenai-responsesAPI - Modified
sanitizeToolCallId()to use hyphens (-) instead of underscores (_) for OpenAI compatibility - Updated
transcript-sanitize.tsto apply sanitization for both Google and OpenAI models
Tool call IDs now correctly match ^[a-zA-Z0-9-]+$ for gpt-5.2 while maintaining backward compatibility with Cloud Code Assist.