{"record":{"id":"faa4530984a86a8f","repo":"microsoft/autogen","slug":"no-annotation","errorCode":null,"errorMessage":"No annotation","messagePattern":"No annotation","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/packages/autogen-core/src/autogen_core/_function_utils.py","lineNumber":316,"sourceCode":"\n\ndef normalize_annotated_type(type_hint: Type[Any]) -> Type[Any]:\n    \"\"\"Normalize typing.Annotated types to the inner type.\"\"\"\n    if get_origin(type_hint) is Annotated:\n        # Extract the inner type from Annotated\n        return get_args(type_hint)[0]  # type: ignore\n    return type_hint\n\n\ndef args_base_model_from_signature(name: str, sig: inspect.Signature) -> Type[BaseModel]:\n    fields: Dict[str, tuple[Type[Any], Any]] = {}\n    for param_name, param in sig.parameters.items():\n        # This is handled externally\n        if param_name == \"cancellation_token\":\n            continue\n\n        if param.annotation is inspect.Parameter.empty:\n            raise ValueError(\"No annotation\")\n\n        type = normalize_annotated_type(param.annotation)\n        description = type2description(param_name, param.annotation)\n        default_value = param.default if param.default is not inspect.Parameter.empty else PydanticUndefined\n\n        fields[param_name] = (type, Field(default=default_value, description=description))\n\n    return cast(BaseModel, create_model(name, **fields))  # type: ignore\n","sourceCodeStart":298,"sourceCodeEnd":325,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/python/packages/autogen-core/src/autogen_core/_function_utils.py#L298-L325","documentation":"Error \"No annotation\" thrown in microsoft/autogen.","triggerScenarios":"Thrown at python/packages/autogen-core/src/autogen_core/_function_utils.py:316 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a type annotation to the parameter"],"exampleFix":"def f(x: int): ...","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}