iflytek/astron-agent · error · ValueError
skillId is required
Error message
skillId is required
What it means
Pydantic field_validator (mode="before") on the Skill model's skillId: a null skillId is rejected before any coercion, since str(None) would silently produce "None". Skill entries in an agent node must carry a concrete skill identifier.
Solutions
- Ensure every skill entry includes a valid skillId before constructing the agent node config
- Filter out skills with null/missing skillId from the list before validation
- Check the upstream skill API response for missing ids and fix the source of skill data
Example fix
// before
{"name": "my-skill", "skillId": null}
// after
{"name": "my-skill", "skillId": "skill-456"} Defensive patterns
Strategy: validation
Validate before calling
def clean_skills(skills: list[dict]) -> list[dict]:
return [s for s in skills if s.get("skillId") is not None] Type guard
def has_skill_id(s: dict) -> bool:
return isinstance(s, dict) and s.get("skillId") is not None Try / catch
from pydantic import ValidationError
try:
skills = [Skill.model_validate(s) for s in raw_skills]
except ValidationError as e:
log.error("skill missing skillId: %s", e.errors())
raise Prevention
- Filter incomplete skill records before building agent node configs
- Ensure the skill marketplace API always returns skillId
- Add a save-time check for skill completeness
When it happens
Trigger: Providing a Skill object with skillId: null or omitting skillId entirely when populating the agent node's skill list — usually from upstream data where skill metadata was incomplete.
Common situations: Marketplace/plugin skill records missing an id field; deserializing skill lists from an API response where skillId is absent; test fixtures with placeholder skills.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- When repoType=2, match.docIds is required and must contain…
- audio_data cannot be empty
- CODE_EXEC_MEMORY_LIMIT_MB must be between
- CODE_EXEC_TIMEOUT_SEC must be between
- Invalid group: . Valid options
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/501b1566c05119e3.
Report an issue: GitHub.
Appendix: source
Thrown at core/workflow/engine/nodes/agent/agent_node.py:145
class Resource(BaseModel):
path: str = Field(min_length=1)
name: str = Field(default="")
downloadUrl: str = Field(default="")
fileExt: str = Field(default="")
fileSize: int = Field(default=0)
skillId: str = Field(..., min_length=1)
name: str = Field(min_length=1, max_length=128)
description: str = Field(min_length=0, max_length=1024)
downloadUrl: str = Field(default="")
resources: List[Resource] = Field(default_factory=list)
sandbox: Dict[str, Any] = Field(default_factory=dict)
@field_validator("skillId", mode="before")
@classmethod
def normalize_skill_id(cls, value: Any) -> str:
if value is None:
raise ValueError("skillId is required")
return str(value)
@field_validator("description", "downloadUrl", mode="before")
@classmethod
def normalize_optional_string_fields(cls, value: Any) -> str:
return "" if value is None else str(value)
@field_validator("sandbox", mode="before")
@classmethod
def remove_untrusted_sandbox_credentials(cls, value: Any) -> dict[str, Any]:
if not isinstance(value, dict):
return {}
sanitized = dict(value)
for key in (
"provider",
"apiKey",
"api_key",
"timeoutSeconds",View on GitHub (pinned to 5e758547a8)