{"record":{"id":"06068b75ce40b2b7","repo":"microsoft/semantic-kernel","slug":"no-openapi-runtimes-found-in-the-manifest","errorCode":null,"errorMessage":"No OpenAPI runtimes found in the manifest.","messagePattern":"No OpenAPI runtimes found in the manifest\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Functions/Functions.OpenApi.Extensions/Extensions/CopilotAgentPluginKernelExtensions.cs","lineNumber":96,"sourceCode":"        using var CopilotAgentFileJsonContents = DocumentLoader.LoadDocumentFromFilePathAsStream(filePath,\n            logger);\n\n        var results = await PluginManifestDocument.LoadAsync(CopilotAgentFileJsonContents, new ReaderOptions\n        {\n            ValidationRules = [] // Disable validation rules\n        }).ConfigureAwait(false);\n\n        if (!results.IsValid)\n        {\n            var messages = results.Problems.Select(static p => p.Message).Aggregate(static (a, b) => $\"{a}, {b}\");\n            throw new InvalidOperationException($\"Error loading the manifest: {messages}\");\n        }\n\n        var document = results.Document;\n        var openAPIRuntimes = document?.Runtimes?.Where(runtime => runtime.Type == RuntimeType.OpenApi).ToList();\n        if (openAPIRuntimes is null || openAPIRuntimes.Count == 0)\n        {\n            throw new InvalidOperationException(\"No OpenAPI runtimes found in the manifest.\");\n        }\n\n        var functions = new List<KernelFunction>();\n        var documentWalker = new OpenApiWalker(new OperationIdNormalizationOpenApiVisitor());\n        foreach (var runtime in openAPIRuntimes)\n        {\n            var manifestFunctions = document?.Functions?.Where(f => runtime.RunForFunctions.Contains(f.Name)).ToList();\n            if (manifestFunctions is null || manifestFunctions.Count == 0)\n            {\n                logger.LogWarning(\"No functions found in the runtime object.\");\n                continue;\n            }\n\n            var openApiRuntime = runtime as OpenApiRuntime;\n            var apiDescriptionUrl = openApiRuntime?.Spec?.Url ?? string.Empty;\n            if (apiDescriptionUrl.Length == 0)\n            {\n                logger.LogWarning(\"No API description URL found in the runtime object.\");","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Functions/Functions.OpenApi.Extensions/Extensions/CopilotAgentPluginKernelExtensions.cs#L78-L114","documentation":"Thrown when a Copilot Agent Plugin manifest parses successfully but its runtimes collection contains no entry whose Type equals RuntimeType.OpenApi. SK only knows how to execute OpenApi runtimes, so a manifest advertising only other runtime types (or none) cannot produce any kernel functions.","triggerScenarios":"A manifest whose runtimes array is empty, null, or contains only non-OpenApi runtime types (e.g. a Script or a type that is not 'OpenApi'). Also when the 'type' field is misspelled or uses a different casing/label than the schema expects.","commonSituations":"Manifest generated by a tool that omitted the runtimes block; manually authored manifest where the runtime type string does not resolve to OpenApi; mismatch between the manifest schema version SK expects and the one used to author it.","solutions":["Open the manifest and confirm the runtimes array contains at least one object with type set to OpenApi.","Verify each runtime has a Spec.Url pointing to a reachable OpenAPI document (local relative path or absolute URL).","If the manifest was generated, regenerate it with a current version of the Teams Toolkit / declarative-agent tooling that emits OpenApi runtimes.","If you only have an OpenAPI spec and no plugin manifest, use kernel.ImportPluginFromOpenApiAsync instead of the Copilot Agent Plugin loader."],"exampleFix":"// before - manifest has no runtimes or wrong type\n\"runtimes\": [ { \"type\": \"REST\", \"spec\": { \"url\": \"openapi.json\" } } ]\n\n// after\n\"runtimes\": [ { \"type\": \"OpenApi\", \"spec\": { \"url\": \"openapi.json\" }, \"runForFunctions\": [ \"getEmails\" ] } ]","handlingStrategy":"validation","validationCode":"var manifest = JsonNode.Parse(File.ReadAllText(filePath));\nvar openApiRuntimes = manifest?[\"runtimes\"]?.AsArray()\n    .Where(r => r?[\"type\"]?.GetValue<string>() == \"OpenApi\").ToList();\nif (openApiRuntimes is null || openApiRuntimes.Count == 0)\n    throw new InvalidOperationException(\"Manifest has no OpenApi runtimes.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm at least one runtime has type OpenApi.","Verify each OpenApi runtime has a Spec.Url.","Use ImportPluginFromOpenApiAsync if you have no plugin manifest."],"tags":["copilot-agent-plugin","manifest","runtime","openapi"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}