router-for-me/CLIProxyAPI · error

plugin ABI version %d is not supported

Error message

plugin ABI version %d is not supported

What it means

After a successful cliproxy_plugin_init call on Windows, the plugin-filled API struct reports an abiVersion different from the host's pluginHostABIVersion. The host only speaks one ABI, so it refuses the plugin and closes it. This protects against struct-layout and calling-convention mismatches.

Source

Thrown at internal/pluginhost/loader_windows.go:109

	client := &dynamicLibraryClient{
		dll:      dll,
		tempPath: loadPath,
		hostCtx:  hostCtx,
		hostAPI: &windowsHostAPI{
			abiVersion: pluginHostABIVersion,
			hostCtx:    uintptr(unsafe.Pointer(hostCtx)),
			call:       windowsHostCallCallback,
			freeBuffer: windowsHostFreeCallback,
		},
	}
	rc, _, errCall := proc.Call(uintptr(unsafe.Pointer(client.hostAPI)), uintptr(unsafe.Pointer(&client.api)))
	if rc != 0 {
		client.closeAfterOpenFailure()
		return nil, fmt.Errorf("cliproxy_plugin_init returned %d: %v", rc, errCall)
	}
	if client.api.abiVersion != pluginHostABIVersion {
		client.closeAfterOpenFailure()
		return nil, fmt.Errorf("plugin ABI version %d is not supported", client.api.abiVersion)
	}
	if client.api.call == 0 || client.api.freeBuffer == 0 {
		client.closeAfterOpenFailure()
		return nil, fmt.Errorf("plugin function table is incomplete")
	}
	return client, nil
}

func shadowCopyPlugin(file pluginFile) (string, error) {
	dir, errDir := shadowPluginDir()
	if errDir != nil {
		return "", errDir
	}
	shadowPluginCleanupOnce.Do(func() {
		removeStaleShadowPlugins(dir)
	})
	return shadowCopyPluginToDir(file, dir)
}

View on GitHub (pinned to 78f0c4079e)

Solutions

  1. Rebuild the plugin from source against the exact pluginhost SDK version shipped with the running server
  2. If you maintain the plugin, verify it copies pluginHostABIVersion from the current SDK headers/module rather than hardcoding a number
  3. Check the release notes of the server for plugin ABI bumps and obtain matching plugin builds
Defensive patterns

Strategy: validation

Try / catch

if err != nil && strings.Contains(err.Error(), "ABI version") {
    log.Error("plugin/host ABI mismatch: rebuild plugin against the running server's SDK version")
}

Prevention

When it happens

Trigger: Plugin compiled against an older or newer version of the pluginhost SDK whose pluginHostABIVersion constant differs; hand-written plugin that forgets to set api.abiVersion; plugin ABI struct layout changed between versions.

Common situations: Upgrading CLIProxyAPI without rebuilding third-party plugins; mixing plugin builds from a different release channel; vendored SDK copy in the plugin drifting from the host.

Related errors


AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15). Data as JSON: /api/errors/44059a8fc7f8c767. Report an issue: GitHub.