microsoft/semantic-kernel · error · InvalidOperationException
No OpenAPI runtimes found in the manifest.
Error message
No OpenAPI runtimes found in the manifest.
What it means
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.
Source
Thrown at dotnet/src/Functions/Functions.OpenApi.Extensions/Extensions/CopilotAgentPluginKernelExtensions.cs:96
using var CopilotAgentFileJsonContents = DocumentLoader.LoadDocumentFromFilePathAsStream(filePath,
logger);
var results = await PluginManifestDocument.LoadAsync(CopilotAgentFileJsonContents, new ReaderOptions
{
ValidationRules = [] // Disable validation rules
}).ConfigureAwait(false);
if (!results.IsValid)
{
var messages = results.Problems.Select(static p => p.Message).Aggregate(static (a, b) => $"{a}, {b}");
throw new InvalidOperationException($"Error loading the manifest: {messages}");
}
var document = results.Document;
var openAPIRuntimes = document?.Runtimes?.Where(runtime => runtime.Type == RuntimeType.OpenApi).ToList();
if (openAPIRuntimes is null || openAPIRuntimes.Count == 0)
{
throw new InvalidOperationException("No OpenAPI runtimes found in the manifest.");
}
var functions = new List<KernelFunction>();
var documentWalker = new OpenApiWalker(new OperationIdNormalizationOpenApiVisitor());
foreach (var runtime in openAPIRuntimes)
{
var manifestFunctions = document?.Functions?.Where(f => runtime.RunForFunctions.Contains(f.Name)).ToList();
if (manifestFunctions is null || manifestFunctions.Count == 0)
{
logger.LogWarning("No functions found in the runtime object.");
continue;
}
var openApiRuntime = runtime as OpenApiRuntime;
var apiDescriptionUrl = openApiRuntime?.Spec?.Url ?? string.Empty;
if (apiDescriptionUrl.Length == 0)
{
logger.LogWarning("No API description URL found in the runtime object.");View on GitHub (pinned to c028a0c7dc)
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.
Example fix
// before - manifest has no runtimes or wrong type
"runtimes": [ { "type": "REST", "spec": { "url": "openapi.json" } } ]
// after
"runtimes": [ { "type": "OpenApi", "spec": { "url": "openapi.json" }, "runForFunctions": [ "getEmails" ] } ] Defensive patterns
Strategy: validation
Validate before calling
var manifest = JsonNode.Parse(File.ReadAllText(filePath));
var openApiRuntimes = manifest?["runtimes"]?.AsArray()
.Where(r => r?["type"]?.GetValue<string>() == "OpenApi").ToList();
if (openApiRuntimes is null || openApiRuntimes.Count == 0)
throw new InvalidOperationException("Manifest has no OpenApi runtimes."); Prevention
- Confirm at least one runtime has type OpenApi.
- Verify each OpenApi runtime has a Spec.Url.
- Use ImportPluginFromOpenApiAsync if you have no plugin manifest.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- CopilotAgent file not found: {filePath}
- Error loading the manifest: {messages}
- AZURE_OPENAI_ENDPOINT is not set.
- Agent Failure - Run terminated: {run.Status} [{run.Id}]: {ru
- Agent Failure - Run not created for thread: ${threadId}
AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13).
Data as JSON: /api/errors/06068b75ce40b2b7.
Report an issue: GitHub.