Now Assist Custom Skill: Error 100004 and Fallback to OpenAI (Empty Response) on Specific Records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi Everyone,
I have configured a Now Assist Custom Skill called "Story Summarizer Per Release" that formats and summarizes Agile Stories associated with a Release record using Google Gemini (gemini_large) as the primary provider.
When executing this skill inside a subflow in Workflow Studio, I am facing an inconsistent behavior where some release records execute perfectly while others fail and fall back to OpenAI with an empty response.
1. Setup Overview
Skill Type: Now Assist Custom Skill (Chat Completions / gemini_large).
Input: Release (Reference to Release table).
Execution Method: Called via Workflow Studio subflow (Execute Skill action).
Expected Output: HTML-formatted summary of stories grouped by product.
2. The Issue
Working Records: When triggered for certain Release records (e.g., Release A), Gemini successfully processes the prompt and returns "provider": "Google Cloud" with valid HTML output.
Failing Records: When triggered for specific Release records (e.g., Release B), the skill fails to return data. The dynamic output shows "provider": "OpenAI", "response": null, and "status": "error".
3. Deep-Dive into Logs (sys_generative_ai_log)
Upon inspecting the sys_generative_ai_log table for both executions, I observed the following:
Successful Execution Log:
Provider: Google Gemini (Chat Completions) / gemini_large
Prompt: Fully populated JSON payload containing raw story details.
Status: success
Failed Execution Log:
Status: error
Error Code: 100004
Prompt: The <prompt/> field in the log is completely empty (0 tokens / executed in 19 ms).
Behavior: Because Gemini aborted immediately due to the empty prompt evaluation, ServiceNow’s Generative AI Controller automatically routed the call to the instance's default fallback provider (OpenAI), which subsequently returned null output because no prompt mapping exists for OpenAI.
4. Subflow Context
Subflow inputs (Release_Record) are correctly populated across all execution runs.
The failure occurs prior to sending the payload to Gemini during the prompt-building/evaluation stage in Now Assist Skill Kit.
5. Questions for the Community
This functionality is working perfectly within our DEV instance, but it is giving these inconsistent results (failing with empty prompts) only after being migrated to our TEST and PROD instances.
What specifically does Error Code 100004 indicate in the Generative AI Controller log?
Any insights or recommendations on how to resolve this empty prompt evaluation issue would be greatly appreciated!
Thanks in advance!
