iflytek/astron-agent · error · Exception
auth name: , auth value
Error message
auth name:{auth_name}, auth value:{auth_value} What it means
Generic Exception raised when the API-key security entry exists but lacks a usable name or x-value. process_authentication requires both auth_name (the credential parameter name) and auth_value (the configured key) to inject the credential into header/query/cookie.
Solutions
- Re-publish/update the tool supplying both the auth parameter name and x-value.
- Inspect the stored security entry (print api_key_info) to confirm which key is missing.
- Add validation at tool registration time so tools without complete credentials are rejected before execution.
- Use distinct error messages for missing name vs missing value to speed diagnosis.
Example fix
// before
auth_name = api_key_info.get("name", None)
auth_value = api_key_info.get("x-value", None)
if not auth_name or not auth_value:
raise Exception(f"auth name:{auth_name}, auth value:{auth_value}")
// after
if not api_key_info.get("name"):
raise ToolAuthConfigError(f"tool {tool_id}: security scheme missing 'name'")
if not api_key_info.get("x-value"):
raise ToolAuthConfigError(f"tool {tool_id}: security scheme missing 'x-value'") Defensive patterns
Strategy: validation
Validate before calling
def has_credentials(api_key_info: dict) -> bool:
return bool(api_key_info.get("name")) and bool(api_key_info.get("x-value")) Type guard
def is_complete_api_key(info) -> bool:
return isinstance(info, dict) and isinstance(info.get("name"), str) and bool(info.get("x-value")) Try / catch
try:
process_authentication(schema, headers)
except Exception as e:
return error_response(422, f"missing API key credentials: {e}") Prevention
- Require name and x-value in the tool publish form
- Validate credentials at registration, not per-request
- Keep auth metadata out of hand-edited schema files
When it happens
Trigger: handle_request_execution -> process_authentication where operation_id_schema['security'][security_type] is missing 'name' or 'x-value', or where either is present but empty/None (falsy).
Common situations: Tool author left the x-value placeholder empty when publishing the community tool; schema import dropped the extension; values stored with wrong keys after a schema format change.
Related errors
- MODEL_APIKEY_ERROR
- RAGFLOW_API_TOKEN not configured in environment variables
- WebSocketClientAuthError
- Security type not found in security schema
- LOGIN_INFO_ERROR
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/caa675116add3937.
Report an issue: GitHub.
Appendix: source
Thrown at core/plugin/link/service/community/tools/http/execution_server.py:220
def process_authentication(
operation_id_schema: Dict[str, Any],
message_header: Dict[str, Any],
message_query: Dict[str, Any],
tool_id: str,
) -> None:
"""Process authentication for the request."""
if not operation_id_schema["security"]:
return
security_type = operation_id_schema["security_type"]
if security_type not in operation_id_schema["security"]:
raise Exception(f"Security type {security_type} not found in security schema")
api_key_info = operation_id_schema["security"].get(security_type)
auth_name = api_key_info.get("name", None)
auth_value = api_key_info.get("x-value", None)
if not auth_name or not auth_value:
raise Exception(f"auth name:{auth_name}, auth value:{auth_value}")
if api_key_info.get("type") == "apiKey":
api_key_dict = {auth_name: auth_value}
if api_key_info.get("in") == "header":
message_header.update(api_key_dict)
elif api_key_info.get("in") == "query":
message_query.update(api_key_dict)
def validate_response_schema( # noqa: C901
result_json: Any, open_api_schema: Dict[str, Any]
) -> List[str]:
"""Validate response against schema and return error messages."""
response_schema = get_response_schema(open_api_schema)
er_msgs: List[str] = []
import jsonschema
View on GitHub (pinned to 5e758547a8)